【问题标题】:Unable to connect to exchange server using power shell无法使用 powershell 连接到 Exchange 服务器
【发布时间】:2020-12-20 14:11:23
【问题描述】:

我正在尝试使用 power shell 连接到 Office 365 Exchange 服务器。我正在使用以下给出的命令进行连接

$cred=Get-Credential

$ses=New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $cred -Authentication Basic -AllowRedirection

但我收到如下错误

New-PSSession : 
[outlook.office365.com] Connecting to remote server outlook.office365.com failed with the following error message : The WinRM client cannot process the request. Basic
authentication is currently disabled in the client configuration. Change the client configuration and try the request again. For more information, see the about_Remote_Troubleshooting
Help topic.

请帮帮我。

【问题讨论】:

  • 如错误所述,端点不支持基本身份验证。请refer to the documentation获取有关如何获取远程会话的说明。

标签: powershell office365 exchange-server


【解决方案1】:

看起来您需要使用现代身份验证:

https://gallery.technet.microsoft.com/Office-365-Connection-47e03052

【讨论】:

    【解决方案2】:

    Windows 远程管理 (WinRM) 需要允许基本身份验证才能创建 Exchange 会话。如果禁用基本身份验证,您将在尝试连接时收到上述错误。

    要检查是否启用了基本身份验证,请在命令提示符下运行以下命令。

    winrm get winrm/config/client/auth

    如果 Basic=true 未设置,则需要运行以下命令来启用基本身份验证。

    winrm set winrm/config/client/auth @{Basic="true"}

    来源:https://o365reports.com/2019/04/17/connect-exchange-online-using-mfa/

    【讨论】:

    • 我把它修好了。感谢您的帮助
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-09-06
    • 1970-01-01
    • 2020-05-22
    • 2020-01-09
    • 1970-01-01
    相关资源
    最近更新 更多