Page 1 of 1

Using the latest Powershell v7.0 with Office 365 / Exchange Online MFA/2FA module?

Posted: Wed Apr 08, 2020 1:19 am
by ITEngineer
What is the latest version of full Powershell module (not the Core edition) ?
How to safely upgrade to that version.

$PSVersionTable result

Code: Select all

Name                           Value
----                           -----
PSVersion                      5.1.18362.752
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.18362.752
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
Because when my Visual Studio code was accidentally updated itself to PS Core v6.0, my Office 365 and Azure Powershell module cannot use MFA/2FA.

Thank you in advance.

Re: Using the latest Powershell v7.0 with Office 365 / Exchange Online MFA/2FA module?

Posted: Wed Apr 08, 2020 2:01 am
by jvierra
Which PowerShell module? The AzureAD module should work with PS 7,PS 5.1. Just install the latest module. If you have already installed it then use "Update-Module AzureAD"

Re: Using the latest Powershell v7.0 with Office 365 / Exchange Online MFA/2FA module?

Posted: Wed Apr 08, 2020 6:41 am
by mxtrinidad
Just an FYI

If you follow PowerShell 7.0 in Github, it's been known that in order to use AzureAD module, you need to use the Import-Module with the -UseWindowsPowerShell parameter.
Then, it will work!

:)