Microsoft PowerShell架构的Microsoft URL已不再有效

时间:2015-01-22 16:41:02

标签: c# powershell exchange-server

我正在尝试创建与IIS 8.5托管的Exchange Powershell的远程连接 - Windows Server 2012 R2。

这是我的代码:

var connInfo = new WSManConnectionInfo(
            new Uri("https://xxx/PowerShell"),
            "http://schemas.microsoft.com/powershell/Microsoft.Exchange",
            credentials);

看起来微软的Schemas网址不再有效。如果我导航到http://schemas.microsoft.com/powershell/Microsoft.Exchange,我就有了这个:

The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.

当我尝试打开连接时,出现此错误:

Connecting to remote server failed with the following error message : The WinRM client received an HTTP bad request status (400), but the remote service did not include any other information about the cause of the failure.

网址是否可以更改?我试图找到一个关于它的话题,但我没有发现任何变化......

1 个答案:

答案 0 :(得分:2)

架构uri不必是“有效”的,因为您无需导航到它。我知道我没有正确解释它,但它更像是一个参考而不是一个有效的位置。

您收到的错误实际上是指您对Exchange Server的uri。如果未连接到Exchange Server,则连接将出错。