Pra*_*Rao 21 powershell powershell-remoting
有点困惑w /远程执行powershell命令.我有一个名为ServerA的测试服务器(Win 2k8-R2-SP1),它正确启用了PowerShell远程处理.从我的开发机器(Win 2k8-R2-SP1),我能够正确远程执行powershell命令.但是,当我尝试从名为ServerB(Win 2k8-R2)的不同服务器执行相同的命令时,我收到以下错误
[ServerA] Connecting to remote server failed with the following error message : The client cannot connect to the destination specified in the request. Verify that the service on the destination is running and is accepting requests. Consult the logs and documentation for the WS-Management service running on the destination, most commonly IIS or WinRM.
If the destination is the WinRM service, run the following command on the destination to analyze and configure the WinRM service: "winrm quickconfig". For more information, see the about_Remote_Troubleshooting Help topic.
+ CategoryInfo : OpenError: (:) [], PSRemotingTransportException
+ FullyQualifiedErrorId : PSSessionStateBroken
这三台机器都在同一个域中.我的困惑是,从我的开发机器,我完全能够连接到ServerA并执行命令.
ServerB没有SP1的事实会有所作为吗?请指教.我使用的是同一个域帐户,该帐户在所有3台服务器上都有管理员权限.
而我正在尝试的命令是
Invoke-Command -ComputerName ServerA -ScriptBlock {Get-UICulture}.
请帮忙.
谢谢
man*_*lds 28
运行winrm quickconfig或Enable-PSRemoting -force从ServerB 运行.
验证服务正在运行 get-service winrm
http://technet.microsoft.com/en-us/magazine/ff700227.aspx
另外,从本地开发框运行:
Set-Item WSMan:\localhost\Client\TrustedHosts -Value "*" -Force
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
48556 次 |
| 最近记录: |