关于powershell:在Windows防火墙中允许WinRM

Allowing WinRM in the Windows Firewall

我正在使用Windows 7机器,安装了Windows电源外壳。如何确保Windows防火墙配置为允许来自工作站的Windows远程管理连接。例如:
netsh advfirewall防火墙设置规则名称=" Windows远程管理(HTTP-In)" profile = public protocol = tcp localport = 5985 remoteip = localsubnet new remoteip = any

我正在执行上述命令,但无法对其进行配置。


Enable-PSRemoting -force是您要寻找的!

winrm quickconfig也是很好的预防措施,启动WinRM Service并将其设置为Auto Start

但是,如果您希望对所有Windows 7计算机执行此操作,则可以通过组策略启用此功能