默认分类

开启powershell远程访问

启用远程功能

Enable-PSRemoting -Force

设置Winrm防火墙

Set-NetFirewallRule -Name "WINRM-HTTP-In-TCP" -Enabled True
Set-Item wsman:\localhost\client\trustedhosts -Value "*"

启动winrm服务

Start-Service winrm
Set-Service winrm -StartupType Automatic

客户端设置不然授权失败

Set-Item wsman:\localhost\client\trustedhosts -Value "*"

客户端连接

Enter-PSSession -ComputerName 192.168.22.167 -Credential administrator

回复

This is just a placeholder img.