I would like to configure psremoting on alot of servers. I was wondering if there a method of setting trustedhosts remotely such as:
Invoke-Command -ComputerName $server -Credential $cred -ScriptBlock{Set-Item WSMan:\localhost\Client\TrustedHosts * -force}
or using another method such as psexec. So far I get alot of access is denied, which I assume is by design but configuring trustedhosts on alot of computers is a bit time consuming.
Thank you