Windows WinRM

44 阅读1分钟
<Server>  
# all network need private category
gpedit.msc
  Computer Configuration -> Windows Settings -> Security Settings -> Network List Manager Policies
      Network Location  -> Private

# powershell (admin)
winrm quickconfig
winrm enumerate winrm/config/listener
Get-Service -Name WinRM
Enable-PSRemoting
<Client> (admin)
start WinRM service temporary 
Set-Item WSMan:\localhost\Client\TrustedHosts -Value <server_ip>
$cred = Get-Credential
Enter-PSSession -ComputerName <server_ip> -Credential $cred