【问题标题】:Powershell and 2 factor authentication in Visual Studio CodeVisual Studio Code 中的 Powershell 和 2 因素身份验证
【发布时间】:2018-10-03 11:49:39
【问题描述】:

是否有插件或插件可以为 Microsoft PowerShell 启用 2 因素身份验证,其功能类似于 Microsoft Exchange Online Powershell 模块?

现在 MS 2FA 已启用,它会阻止您在不使用 Microsoft Exchange Online PowerShell 模块的情况下运行 Powershell。

【问题讨论】:

    标签: powershell visual-studio-code


    【解决方案1】:

    MFA 是在 Azure AD 或 O365 中设置的,而不是在 PS 中,您使用 PS(控制台主机、ISE、VSCode)通过定义的 Exchange 模块使用启用 MFA 的帐户进行连接。

    Connect to Exchange Online PowerShell using multi-factor authentication

    如果要使用多重身份验证 (MFA) 连接到 Exchange Online PowerShell,则不能使用连接到 Exchange Online PowerShell 中的说明使用远程 PowerShell 连接到 Exchange Online。

    MFA 要求您安装 Exchange Online 远程 PowerShell 模块,并使用 Connect-EXOPSSession cmdlet 进行连接。

    1.在您的本地计算机上,打开 Exchange Online 远程 PowerShell 模块(Microsoft Corporation > Microsoft Exchange Online Remote PowerShell 模块)。 2.您需要运行的命令使用如下语法:

    Connect-EXOPSSession -UserPrincipalName <UPN> [-ConnectionUri <ConnectionUri> -AzureADAuthorizationEndPointUri <AzureADUri>]
    

    Using PowerShell ISE to connect to Exchange Online when MFA is enabled

    【讨论】:

      猜你喜欢
      • 2020-05-16
      • 1970-01-01
      • 2011-03-19
      • 2011-05-02
      • 2021-12-25
      • 1970-01-01
      • 2019-12-10
      • 1970-01-01
      • 2016-06-06
      相关资源
      最近更新 更多