This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Get a list of trusted hosts | |
Get-Item WSMan:\localhost\Client\TrustedHosts | |
# Note that these commands don't create a list of trusted hosts, it simply replaces the trusted host with what you set via the command. If you need to add multiple hosts, they need to be comma seperated | |
# Trust all computers in a domain | |
Set-Item WSMan:\localhost\Client\TrustedHosts *.contoso.com | |
# Turst a single machine | |
Set-Item WSMan:\localhost\Client\TrustedHosts -Value myserver |