2013-07-10 45 views
2

我想远程启用其他计算机上的powershell远程处理。而远程计算机需要认证。我试图创建一个批处理文件来调度执行Enable-Psremoting的任务,显然我无法将它放到远程计算机中。远程启用-psremoting

回答

6

如果您位于域中,则可以创建GPO以启用远程处理。见http://www.briantist.com/how-to/powershell-remoting-group-policy/

你也可以use psexec to remotely execute PowerShell(见“whatyousay”的答案在底部),传递enable-psremoting作为脚本来执行。

psexec \\[computer name] -u [admin account name] -p [admin account password] -h -d powershell.exe "enable-psremoting -force" 

如果你做了很大量的系统,GPO可能是最好的 - 尽管你可以通过计算机的列表环绕psexec版本循环PowerShell脚本。