Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.
Update TrustedHosts using PowerShell.
July 3, 2016
Q. How can I easily add entries to TrustedHosts using PowerShell?
A. TrustedHosts enable management via WS-Management of machines in a workgroup or different domain that have no trust relationship. To add machines to TrustedHosts use the following PowerShell which adds all machine in savilltech.net to the existing hosts.
$trusthosts = (Get-Item -Path WSMan:localhostClientTrustedHosts).ValueSet-Item -Path WSMan:localhostClientTrustedHosts "$trusthosts, *.savilltech.net" -Force
You May Also Like