Forum Discussion
M3Jota
Nov 12, 2020Copper Contributor
Unable to Connect to ExchangeOnline
So we have MFA enabled on our Office 365 accounts. From my Windows 10 computer, I can connect to the ExchangeOnlineManagement module without issue. However, on my DC I installed Powershell 7.0.3, the...
farismalaeb
Nov 12, 2020Steel Contributor
I am not totally sure, but based on some reading I did there is a compatibility issues between Powershell 7 and ExchangeOnline, even though its almost 1 year post, but not sure if MS fix it or not.
https://github.com/PowerShell/PowerShell/issues/11070
I have the same case, and I am using Powershell 5.1 to manage Exchange Online, as it seems that Powershell Core is not compatible with the module.
even in Windows Event Log I have the following Warning:
Error Message = Could not load type 'System.Security.Cryptography.SHA256Cng' from assembly 'System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'..
Fully Qualified Error ID = System.Exception,Microsoft.Exchange.Management.ExoPowershellSnapin.NewExoPSSession
Context:
Severity = Warning
Host Name = ConsoleHost
Host Version = 7.1.0
Host ID = d1434fc6-2c2d-4b64-8ca4-38ca5f6668c9
Host Application = C:\Program Files\PowerShell\7-preview\pwsh.dll -WorkingDirectory ~
Engine Version = 7.1.0
Runspace ID = d84be782-d5d3-413a-b7c1-a2ab71ab9e4f
Pipeline ID = 75
Command Name = New-ExoPSSession
Command Type = Cmdlet
Script Name = C:\Program Files\WindowsPowerShell\Modules\ExchangeOnlineManagement\2.0.3\ExchangeOnlineManagement.psm1
Command Path =
Sequence Number = 8
User = 266517A\User390
Connected User =
Shell ID = Microsoft.PowerShell
User Data:
---------------------------
If you find this answer helpful, Please click on Best Response and give like
VasilMichev
Nov 12, 2020MVP
farismalaeb is correct, the ExO V2 module doesnt support PowerShell 7/Core yet. A preview version is available and GA should follow in the coming weeks/months.
- Lu_LiNov 26, 2020Copper Contributor
Hi VasilMichev , i am facing the same issue to use powershell script 7 to connect to ExchangeOnline.
Just wondering if you know what is current progress ? Thanks.
- M3JotaNov 26, 2020Copper ContributorPowershell 7 is not compatible with EXO. Must use powershell 5 or 6.
- chahrenApr 11, 2022Copper ContributorFor those (like me) finding this in 2022 or later, current versions of ExchangeOnlineManagement are compatible with PowerShell Core. To fix this issue, install ExchangeOnlineManagement 2.0.4+
Open a command prompt with admin rights and enter:
Install-Module ExchangeOnlineManagement -Force
This installs the latest version alongside your current instance.