一、启用远程管理
1、将管理服务器的trusthost列表改为*
运行Set-item wsman:localhost\client\trustedhosts –value *
2、在远程服务器上运行Enable-PSremoting
注:
在本地服务器上以Administrator运行“Enable-Psremoting 、 Winrm Quickconfig 、 Set-WSManQuickConfig”,均提示“访问被拒绝”,可能的原因如下:
1.在工作组计算机上,确认组策略: secpol.msc > Local Policies > Security Options > Network Access: Sharing and security model for local accounts - change to classic
2.修改注册表:Set-ItemProperty –Path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System –Name LocalAccountTokenFilterPolicy –Value 1 –Type DWord
3.确认WinRM服务是否正在运行,Windows Firewall服务是否正在运行,网络位置是否不是“公用”,如果要启用PS远程管理,此时网络位置不能被设置为public,因为Windows 防火墙例外不能在网络位置是public时被启用。
4.Telnet localhost 47001是否可以连通
5.运行 winrm get winrm/config 是否会提示“访问被拒绝”
6.Administrator密码不能为空