Feedback by UserVoice

I suggest you ...

Powershell ISE Freezes when MFA is Enabled

After enabling MFA for our accounts now everyone has issues using the PowerShell ISE tool with the MSOnline modules. About 5-15 minutes after loading the MSOnline module and making the connection using Connect-MSOLService the entire ISE window will freeze and you have to use task manager to kill it. If you disable MFA for the user account in use then the problem goes away. This is using the latest versions of the cmdlets and on a Windows 10 Creators update computer. This has been an on-going issue since PowerShell 4.0. It appears to be related to an issue with WinForms in PowerShell. This is only in the ISE window. If using a normal PowerShell window then the issue is not seen.

774 votes
Sign in
Sign in with: Facebook Google
Signed in as (Sign out)
You have left! (?) (thinking…)
Eric shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →


Sign in
Sign in with: Facebook Google
Signed in as (Sign out)
An error occurred while saving the comment
  • Anonymous commented  ·   ·  Flag as inappropriate

    I removed my votes after reading Microsoft's response. I believe they are right in pointing out that scripts should not be ran from ISE but rather developed and tested in an IDE but ran from a Powershell console.

  • Anonymous commented  ·   ·  Flag as inappropriate

    The comment from MS to use VS Code is not a great answer. I like most of the others who have posted here am in the ISE all the time. VS Code is overkill for most of what I need to do, and there are times when I'm not on my computer needing to do work. I don't want to have to install VS Code on every computer I need to use just to be able to edit or make new scripts and run them while using MFA. I also honestly don't want to have to learn all of the ins and outs of VS Code either when I'm not a programmer.

    Just fix the ISE to work with MFA. I think your customers here would prefer a fix that will work on every computer that they use without having to install another program.

  • Mike Nichols commented  ·   ·  Flag as inappropriate

    Thanks for the update.

    This has been an annoyance when writing Azure powershell scripts as well and i wasn't aware of Visual Studio Code as being an alternative to ISE.

  • MS commented  ·   ·  Flag as inappropriate

    Response from Microsoft:

    Our engineering and support teams have looked into this ISE issue, performed testing, and engaged our PowerShell dev team for guidance. From those sessions, we have the following info to share:
    • Bottom-line --- ISE was not built to support cloud environments or modern auth/MFA and therefore, is not (and will not be in the future) a viable/supported tool for scripting in Office 365
    • Next Steps --- The Microsoft solution alternative is the use of Visual Studio Code (note that there are 3rd party options out there that also work)
    o Visual Studio Code (VS code) supports modern auth/MFA, is similar to ISE (UI is different), should have a very minimal learning curve, can be used to create and debug PS scripts, and can reuse the same scripts you have already created
    o Best practice is to run the script in a PowerShell window (not VS Code or other development environment) once the script has been debugged

  • Rodolfo Marra commented  ·   ·  Flag as inappropriate

    Same problem here. After 10-15 minutes using PowerShell ISE with MFA module imported, ISE app just freeze and I lost all information saved on variables. Need to change our scripts to run less than 10 minutes to avoid this issue. Just weird the way engineer teams work with it, or just ignore our problem.

  • Marci Shindel commented  ·   ·  Flag as inappropriate

    Adding my company to this list of companies with this issue - since our TAM suggested we add our 2 cents to this chain as well. We have a ticket open with MS on this exact issue. Their (unacceptable) response is/was:

    "“The ISE is supported in all supported versions of Windows PowerShell up to and including Windows PowerShell V5.1. The ISE, however, is in maintenance mode and no new features are likely to be added, (this includes hotfixes). Additionally, there is no support for the ISE with PowerShell v6 and beyond.” Note: right now Windows 10 1903 is running in Power Shell 5.1 "

    However, we are using ISE 5.1 (so it should be supported) - we are connecting to GCCH. Not ready to let this go at this point, pushing back on MS to resolve. I am able to connect to EXO using plain PowerShell and the Exchange module w/o it locking up... the issues are just with the ISE to GCC, not to our old O365 environment. I can connect to JUST AzureAD/MSOL in the new environment w/o it locking up (have not tested SfB yet).

  • Alan commented  ·   ·  Flag as inappropriate

    They're clearly not going to fix this after two years. Likely due to the MSOL module being deprecated in favor of the AAD module, which is not a complete replacement and doesn't provide all of the same functionality.

  • Charles commented  ·   ·  Flag as inappropriate

    Same problem here...Very annoying!!! Almost two years and no response from Microsoft...Looks like we will be stuck with this problem for a looooong time

  • Lisa Holmes commented  ·   ·  Flag as inappropriate

    ok per my comment below it worked for awhile for my colleague but locked up on me right away

  • Lisa Holmes commented  ·   ·  Flag as inappropriate

    I was able to log into ISE with MFA with the following:

    Import-Module $((Get-ChildItem -Path $($env:LOCALAPPDATA+"\Apps\2.0\") -Filter Microsoft.Exchange.Management.ExoPowershellModule.dll -Recurse ).FullName|?{$_ -notmatch "_none_"}|select -First 1)
    $EXOSession = New-ExoPSSession
    Import-PSSession $EXOSession

  • Torgeir commented  ·   ·  Flag as inappropriate

    Come on Microsoft, we are waiting for a fix for this. At least get an alternative way to sign in!

  • Greg commented  ·   ·  Flag as inappropriate

    Security is being compromised. We are unable to run Powershell without MFA crashing it.

  • Anonymous commented  ·   ·  Flag as inappropriate

    Confirmed, this is still an issue. Many hours of work have been lost because of this bug.

  • Matt commented  ·   ·  Flag as inappropriate

    Please fix. If it is an auth pop up -normally what happens in non-ISE windows -then figure out how to make that work.

← Previous 1 3

Feedback and Knowledge Base