When PowerShell v7.1.0-preview.7 or v7.1.0-rc.1 is started as Administrator on Windows, and I start some mmc snap-in: compmgmt, diskmgmt, etc., it locks the console until I close the snapin.
It doesn't lock on v7.1.0-preview.6 and earlier versions.
It doesn't lock when PowerShell started as standard user (no elevation).
Also, it doesn't lock, when I start the snapin as mmc compmgmt.msc
I haven't found (yet?) other file types, that behave like this, maybe there are some.
compmgmt
Computer management snapin starts, console doesn't lock.
Computer management snapin starts, console locks until snapin closes.
Name Value
---- -----
PSVersion 7.1.0-rc.1
PSEdition Core
GitCommitId 7.1.0-rc.1
OS Microsoft Windows 10.0.19042
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0鈥
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
This only appears to repro in Windows Terminal and not conhost. cc @dhowett
It doesn't lock on
v7.1.0-preview.6and earlier versions.
That's alarming!
This reproduces in conhost and terminal for me.


I'm probably not familiar enough to trace exactly where or why this changed, but I have a feeling it's probably a .NET change between the preview versions used for 7.1-p6 and later 7.1 previews/RC.
The change in https://github.com/PowerShell/PowerShell/pull/13481 landed in preview7, and it changes a bit about how PowerShell detects what applications to "wait" for. It looks like it subtly shuffles the logic around in a way that may have caused an issue?
/cc @iSazonov
@dhowett, oops I forgot to run cmd.exe elevated which is why it didn't repro for me...
Ok, I think I figured out the problem. Thanks @dhowett for pointing to that PR. Working on a fix.
:tada:This issue was addressed in #13750, which has now been successfully released as v7.1.0-rc.2.:tada:
Handy links:
:tada:This issue was addressed in #13750, which has now been successfully released as v7.2.0-preview.1.:tada:
Handy links: