Powershell Invoke-Command remote works manually, but not from Jenkins
问题 I have a really strange situation where the same command works when run manually from a Windows Server 2012 R2, but not from the Jenkins slave process running on the same server. First, the output from the manual run, an admin PowerShell window: PS C:\Users\Administrator> whoami win-cm8utd1qfnc\administrator PS C:\Users\Administrator> Invoke-Command -computername web.sandbox.MUNGED.com -scriptblock {iisreset /restart} Attempting stop... Internet services successfully stopped Attempting start.