< Back

Get-CTrustedHost

Sun Jan 12, 2020 9:59 pm

NAME Get-CTrustedHost



SYNOPSIS

Returns the current computer's trusted hosts list.





SYNTAX

Get-CTrustedHost [<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.





PARAMETERS

<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS

System.String.





-------------------------- EXAMPLE 1 --------------------------



PS C:\\>Get-CTrustedHost



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











RELATED LINKS