Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 6937

remotely set trusted hosts

$
0
0

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


Viewing all articles
Browse latest Browse all 6937