且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

PowerShell - 在远程机器上执行脚本给出错误

更新时间:2023-12-04 19:17:52

这与其说是答案,不如说是一种解决方法,但是既然您可以使用 wmi,为什么不尝试用它创建远程进程呢?看看这里 http://www.lazywinadmin.com/2011/06/powershell-launchstart-process-on.html?m=1

This is more a workaround than an answer but as you re able to use wmi why not try to create the remote process with it? Have a look here http://www.lazywinadmin.com/2011/06/powershell-launchstart-process-on.html?m=1

评论交流后,问题是您没有为远程主机提供具有管理权限的凭据.

After comments exchange, the problem is that you had not provide a credential with administrative privilege for the remote host.