【问题标题】:Unable to Connect to live@edu through Powershell无法通过 Powershell 连接到 live@edu
【发布时间】:2013-03-29 00:58:28
【问题描述】:

嗨,

我正在尝试使用 powershell 和以下命令连接到 live@edu。

命令触发:

$SessionNew = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://pod51002psh.outlook.com/powershell

错误:

[pod51002psh.outlook.com] 连接到远程服务器失败并显示以下错误消息:WinRM 客户端无法 处理请求。目标计算机对该请求返回了一个空响应。有关详细信息,请参阅 about_Remote_Troubleshooting 帮助主题。 + CategoryInfo : OpenError: (System.Manageme....RemoteRunspace:RemoteRunspace) [], PSRemotingTransportExc 选项 + FullyQualifiedErrorId : PSSessionOpenFailed

谁能建议我如何处理此类错误。

我正在使用以下系统环境。 Win 7,默认版本的 powershell 和 IIS 功能已启用。

提前谢谢.....

【问题讨论】:

    标签: powershell powershell-remoting


    【解决方案1】:

    此代码有效吗?

    $Uri = "https://pod51002psh.outlook.com/powershell/"
    $Credentials = Get-Credential
    $SessionNew = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri $Uri -Credential $Credentials -Authentication Basic –AllowRedirection
    Import-PSSession $SessionNew
    

    【讨论】:

      【解决方案2】:

      要使“Import-PSSession”正常工作,您必须更改本地执行策略:

      Set-ExecutionPolicy remotesigned
      

      【讨论】: