Powershell: When PowerShell runs elevated on Windows, starting *.msc files locks the console

Created on 5 Oct 2020  路  9Comments  路  Source: PowerShell/PowerShell

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.

Steps to reproduce

compmgmt

Expected behavior

Computer management snapin starts, console doesn't lock.

Actual behavior

Computer management snapin starts, console locks until snapin closes.

Environment data

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
Issue-Bug Resolution-Fixed WG-Engine

All 9 comments

This only appears to repro in Windows Terminal and not conhost. cc @dhowett

It doesn't lock on v7.1.0-preview.6 and earlier versions.

That's alarming!

This reproduces in conhost and terminal for me.

image

image

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:

Was this page helpful?
0 / 5 - 0 ratings