3

对于交换,使用的连接 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有区别?

4

1 回答 1

6

Exchange 实现了自己的 PowerShell 远程处理终结点,该终结点由 IIS 托管。此端点(除其他外)实现基于角色的访问控制 (RBAC),仅授予连接用户有权使用的 Cmdlet 的访问权限(默认端点不这样做)。

于 2013-12-24T10:17:25.910 回答