Last time I showed how to read the trusted host list – this is how you add a trusted host
function add-trustedhost {
[CmdletBinding()]
param (
[string]$trustedhost,
[string]$computername = $env:COMPUTERNAME
)
if (Test-Connection -ComputerName… Read the full text.