Get-TrustedHost

Returns the current computer's trusted hosts list.

Syntax

Get-TrustedHost [<CommonParameters>]

Description

PowerShell stores its trusted hosts list as a comma-separated list of hostnames in the WSMan drive. That's not very useful. This function reads that list, splits it, and returns each item.

Return Values

System.String.

EXAMPLE 1

Get-TrustedHost

If the trusted hosts lists contains example.com, api.example.com, and docs.example.com, returns the following:

example.com
api.example.com
docs.example.com