$PSVersionTable output is
Name Value
---- -----
PSVersion 5.1.18362.628
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.18362.628
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
[System.Environment]::OSVersion.Version output is
Major Minor Build Revision
----- ----- ----- --------
10 0 18363 0
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe started as a user who is a member of the local administrator's group, but not in elevated mode. Call this the 'parent' console.
In the parent console, execute (where 'UserName' should be replaced by either the same or a different user logged-in interactively to the computer)
Start-Process -FilePath powershell.exe -Credential UserName
Upon entering the correct password for 'UserName', a new PowerShell window opens (let's call this the 'child' console). Within that, type 'exit' and then hit the Enter/Return key. Nothing happens in the child console: no letters appear, the Enter/Return is not processed.
Switch to the parent console, press the space bar four times. As the space bar is pressed, 'exit' will appear in the child console. Pressing the space bar one more time will cause the 'Enter/Return' key to be processed in the child and it will then exit.
I've tried this on another machine running a 2016 version (10.0 build 14393) of Win 10 with the same results.
This doesn't seem right. Is it right? If it is, how do I avoid it?
Thank you.