Forum Discussion
Unable to connect to Exchange Online (Powershell) with MFA
Works fine here. Do note however that the MFA module does NOT support PowerShell Core yet, use the "old" version (the one built-in in Windows).
How do I switch to the old version. I am using PS-ISE. Thanks,.
- VasilMichevFeb 05, 2019MVP
You shouldn't be using the ISE. When you install the ExO MFA module, it will place a shortcut on your desktop. Use that to launch it, then use the Connect-EXOPSSession cmdlet to connect.
- pdestefanisJun 25, 2020Iron Contributor
The level of fragmentation in the tooling of PowerShell is amazing...
- Jeff HarlowFeb 05, 2019Iron Contributor
Always used ISE. Plus I have scripts that do more than just EXO.
- VasilMichevFeb 05, 2019MVP
Nobody is stopping you from using those. But the ExO MFA module is not supported in ISE. There are some methods to get it working, if you insist on that approach. It boils down to finding the location where the click-once package was installed and loading the relevant script from there. So something like this:
$targetdir = (dir $env:LOCALAPPDATA"\Apps\2.0\" -Include CreateExoPSSession.ps1,Microsoft.Exchange.Management.ExoPowershellModule.dll -Recurse | Group Directory | ? {$_.Count -eq 2}).Values | sort LastWriteTime -Descending | select -First 1 | select -ExpandProperty FullName
. $targetdir\CreateExoPSSession.ps1