我有一个我开发的 powershell 脚本,可以手动运行。但是,当我将脚本放入 sql server 作业并尝试运行以下行时...
SET-LOCATION "$NewTargetPath\"
TortoiseProc /command:update /path:$SVNRepository /closeonend:3
我收到以下错误:
Executed as user: myserviceaccount. A job step received an error at line 146 in a PowerShell script. The corresponding line is 'TortoiseProc /command:update /path:$SVNRepository /closeonend:3'. Correct the script and reschedule the job. The error information returned by PowerShell is: 'The term 'TortoiseProc' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. '. Process Exit Code -1. The step failed.
我检查了它们看起来都不错的路径,我什至可以从服务器上的 powershell 命令行运行命令。关于在哪里寻找为什么会发生此错误的任何想法?