0
當我從powershell
執行psexec \\<remote-machine> -u <user> -i 2 cmd.exe /c D:\temp_copy\run1.bat
時,它會執行。但是當我嘗試從詹金斯執行相同的操作時,它會給出The term '.\psexec' is not recognized as the name of a cmdlet, function, script...
。我也注入了環境變量,這些變量具有psexec的路徑,但仍然失敗。有人能指導我需要做什麼嗎?從jenkins中的powershell執行PsExec
您可以嘗試指定psexec的完整路徑,或者在腳本中使用'(gci env:Path | select -ExpandProperty Value)-split';''轉儲* path *環境以確保路徑在那裏。 –
它具有PSTools的路徑,它包含psexec.exe – HunterrJ
但是,當從詹金斯檢查它不存在。 – HunterrJ