I want to connect via winrm to other computers. I got only the FQDN of the destination computer which i want to connect. I have no information of the destination whether it is in a trusted Domain. So the basic question is how do i now which Authentication mechanism is needed to connect? Are there any C# .NET methods to check that?
Or is the easier way to set the authentication mechanism to kerberos, and if it fails set it to negotiate?
WSManConnectionInfo wci = new WSManConnectionInfo(TargetUri, ShellUri.ToString(), Credential);
wci.AuthenticationMechanism = AuthenticationMechanism.Kerberos;