如何使用 powershell 调用远程命令。两台计算机都在同一个网络中,我可以从一台到另一台建立远程桌面连接。
编辑:两台机器都有Powershell V2,Windows Server 2008。
我尝试完成的任务是从第一台计算机重新启动第二台和第三台计算机上的Velocity。执行此操作的 Comandlet 是restart-cachehost
.
您需要在 XP SP3、Win2k3 SP2、Vista、Windows 7 或 Windows Server 2008 上使用 Powershell 2.0 和 WinRM。
您可以在此处获取 Powershell 2.0 的最新版本:http : //support.microsoft.com/kb/968929
以及快速入门指南:http : //blogs.msdn.com/powershell/archive/2008/12/24/configuring-powershell-for-remoting-part-1.aspx
请注意 WinRM 的默认端口已更改:http : //blogs.msdn.com/wmi/archive/2009/07/22/new-default-ports-for-ws-management-and-powershell-remoting.aspx
归档时间: |
|
查看次数: |
849 次 |
最近记录: |