I have a c# app that uses winrm to connect to other machines. In order to make it work, I need to run the powershell command:
Set-Item WSMan:\localhost\Client\TrustedHosts -Value $ip -Force
or winrm command:
winrm set winrm/config/client '@{TrustedHosts="10.0.5.35"}'
I was wondering what is the equivalent of that in c#?