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.
Learn how to modify TrustedHosts with PowerShell.
February 14, 2016
Q. How can I modify TrustedHosts using PowerShell?
A. To modify TrustedHosts using PowerShell leverage the WSMan provider and set the TrustedHosts value under localhostClient. For example to set TrustedHosts to every machine in your domain namespace use:
Set-Item -Path WSMan:localhostClientTrustedHosts -Value '*.savilltech.net'
To set to have no trusted hosts use:
Set-Item -Path WSMan:localhostClientTrustedHosts -Value ''
To avoid the prompt to make the change add -Force, for example:
Set-Item -Path WSMan:localhostClientTrustedHosts -Value '' -Force
You May Also Like