我有一个我开发的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命令行运行命令。关于在哪里寻找可能发生此错误的原因的任何想法?