Client
PS C:\Windows\system32> Get-ChildItem -Path WSMan:\localhost\Client
WSManConfig: Microsoft.WSMan.Management\WSMan::localhost\Client
Type Name SourceOfValue Value
---- ---- ------------- -----
System.String NetworkDelayms 5000
System.String URLPrefix wsman
System.String AllowUnencrypted false
Container Auth
Container DefaultPorts
System.String TrustedHosts *
Auth
PS C:\Windows\system32> Get-ChildItem -Path WSMan:\localhost\Client\Auth
WSManConfig: Microsoft.WSMan.Management\WSMan::localhost\Client\Auth
Type Name SourceOfValue Value
---- ---- ------------- -----
System.String Basic true
System.String Digest true
System.String Kerberos true
System.String Negotiate true
System.String Certificate true
System.String CredSSP false
TrustedHosts
Specifies the list of remote computers that are trusted. Other computers in a workgroup or computers in a different domain should be added to this list.
Set the TrustedHosts
list
winrm set winrm/config/client '@{TrustedHosts="serverA,serverB,serverC"}'
winrm set winrm/config/client '@{TrustedHosts ="10.40.30.103"}'
winrm set winrm/config/client '@{TrustedHosts ="[fe80::9d5b:8d26:5f86:2a2f]"}'
winrm set winrm/config/client '@{TrustedHosts ="*"}'
winrm set winrm/config/client '@{TrustedHosts =""}'
Get-ChildItem -Path WSMan:\localhost\Client\TrustedHosts
Set-item WSMan:\localhost\Client\TrustedHosts -Value "192.168.0.*" -Concatenate
Set-item WSMan:\localhost\Client\TrustedHosts -Value *
Set-item WSMan:\localhost\Client\TrustedHosts -Value ''