I recently upgraded to the latest version of the Exchange Online Management module (v3.7.1), and now I'm facing an issue when trying to use Connect-ExchangeOnline or Connect-IPPSSession in PowerShell ISE. The error message I'm seeing is: 'A window handle must be configured,' which you can find more about at aka.ms/msal-net-wam#parent-window-handles. It looks like this is happening because ISE doesn't support the new MSAL-based interactive authentication in this version. To temporarily fix the problem, I rolled back to v3.6.0, and everything works perfectly in ISE again with this command: Uninstall-Module ExchangeOnlineManagement -AllVersions -Force, followed by Install-Module ExchangeOnlineManagement -RequiredVersion 3.6.0 -Force. Until support for ISE gets resolved, I suggest sticking to v3.6.0 or switching to Windows Terminal or the PowerShell console for versions 3.7.x and above. I'm sharing this experience in case anyone else encounters the same issue after upgrading or installing freshly.
3 Answers
It's a shame, but many services are moving away from ISE; it's pretty much considered obsolete. If you're looking for a better option, I recommend installing VS Code and using that instead. It's a great alternative for PowerShell scripting and offers a better experience overall.
I tried using VS Code, but I'm having some issues with the new version of the Exchange module using it. Thought switching would be easy, but it hasn't been.
Honestly, ISE is pretty much obsolete at this point. It's not keeping up with the latest advancements in PowerShell.
Yeah, ISE is pretty much out of the picture now. Even SharePoint's PnP module dropped support for PowerShell 5.1 and ISE a while ago. They now require PowerShell 7.2 or later for all the new features, so it might be time to move on from 5.1 if you can.
Absolutely! Transitioning away from 5.1 is essential.
So is it that ISE itself isn't supported, or is it PowerShell 5.1 that's causing the issues? They seem like different problems to me.
Totally agree! VS Code with the PowerShell extension is fantastic. Just in case someone runs into ISE issues, this is the way to go.