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

Ask your PowerShell-related questions, including questions on cmdlet development!
Forum rules
Do not post any licensing information in this forum.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Locked
User avatar
ITEngineer
Posts: 210
Joined: Wed Oct 12, 2011 10:52 am

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

Post 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.
/* IT Engineer */

jvierra
Posts: 14545
Joined: Tue May 22, 2007 9:57 am
Contact:

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

Post 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"

User avatar
mxtrinidad
Site Admin
Posts: 399
Joined: Sun Mar 03, 2013 12:42 pm

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

Post 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!

:)

Locked