PowerTip: Use PowerShell to View Trusted Hosts

PowerTip: Use PowerShell to View Trusted Hosts

  • Comments 2
  • Likes

Summary:  Learn how to use Windows PowerShell to view trusted hosts on a local computer.

Hey, Scripting Guy! Question How can I find out if any trusted hosts are configured on my local computer?

Hey, Scripting Guy! Answer Use the Get-Item cmdlet and view the trusted hosts from the WSMan drive, as shown here.

Get-Item WSMan:\localhost\Client\TrustedHosts


Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment
  • How do I delete an item in the trusted hosts list?

  • To delete WinRM Set WinRM/Config/Client '@{TrustedHosts="ProvideOnlyRequredHosts"}' or WinRM Set WinRM/Config/Client '@{TrustedHosts=""}' # Removes All