简体   繁体   English

Visual Studio Code中的Powershell和2因素身份验证

[英]Powershell and 2 factor authentication in Visual Studio Code

Is there a add on or plug in that enables 2 factor authentication for Microsoft PowerShell that functions like the Microsoft Exchange Online Powershell Module? 是否有附加组件或插件可以为Microsoft PowerShell启用2要素身份验证,其功能类似于Microsoft Exchange Online Powershell模块?

Now that MS 2FA is enabled it stop you running Powershell with out using the Microsoft Exchange Online PowerShell Module. 现在启用了MS 2FA,它使您无需使用Microsoft Exchange Online PowerShell模块即可运行Powershell。

MFA is setup in Azure AD or O365, not in PS, the you use PS (consolehost, ISE, VSCode) to connect using and MFA enabled account via the defined Exchange module. MFA是在Azure AD或O365中而不是在PS中设置的,您可以使用PS(主机,ISE,VSCode)通过已定义的Exchange模块使用启用了MFA的帐户进行连接。

Connect to Exchange Online PowerShell using multi-factor authentication 使用多因素身份验证连接到Exchange Online PowerShell

If you want to use multi-factor authentication (MFA) to connect to Exchange Online PowerShell, you can't use the instructions at Connect to Exchange Online PowerShell to use remote PowerShell to connect to Exchange Online. 如果要使用多因素身份验证(MFA)连接到Exchange Online PowerShell,则不能使用“连接到Exchange Online PowerShell”中的说明使用远程PowerShell连接到Exchange Online。

MFA requires you to install the Exchange Online Remote PowerShell Module, and use the Connect-EXOPSSession cmdlet to connect. MFA要求您安装Exchange Online远程PowerShell模块,并使用Connect-EXOPSSession cmdlet进行连接。

1.On your local computer, open the Exchange Online Remote PowerShell Module ( Microsoft Corporation > Microsoft Exchange Online Remote PowerShell Module). 1.在本地计算机上,打开Exchange Online远程PowerShell模块(Microsoft Corporation> Microsoft Exchange Online远程PowerShell模块)。 2.The command that you need to run uses the following syntax: 2.您需要运行的命令使用以下语法:

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

Using PowerShell ISE to connect to Exchange Online when MFA is enabled 启用MFA后,使用PowerShell ISE连接到Exchange Online

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM