对于交换,使用的连接 uri 是:
http://machineName/powershell
WSManConnectionInfo 对象通过以下方式创建:
WSManConnectionInfo connectionInfo = new WSManConnectionInfo(new Uri("http://machineName/powershell"), "http://schemas.microsoft.com/powershell/Microsoft.Exchange", ExchangeCredential)
要连接到 Windows,使用的 uri 是
http://machineName:5985/wsman
WSManConnectionInfo 对象通过以下方式创建:
WSManConnectionInfo connectionInfo = new WSManConnectionInfo(new Uri("http://machineName:5985/wsman"), "http://schemas.microsoft.com/powershell/Microsoft.PowerShell", credential);
为什么exchange和windows的连接uri有区别?