PowerShell
PowerShell copied to clipboard
start-process with credentials leaks a process
Prerequisites
- [X] Write a descriptive title.
- [X] Make sure you are able to repro it on the latest released version
- [X] Search the existing issues.
- [X] Refer to the FAQ.
- [X] Refer to Differences between Windows PowerShell 5.1 and PowerShell.
Steps to reproduce
Start-Process -credential $Credentials cmd correctly start cmd-command prompt (as another user) but when that command prrompt is closed there remains another process running. Is name is OpenConsole.exe
This does not happen when no other credentials are specified.
Expected behavior
Only cmd.exe should be running as another user
Actual behavior
cmd.exe is running as another user
OpenConsole.exe is running as the current user
OpenConsole.exe is not terminated when cmd.exe is closed
Error details
No response
Environment data
32;1mName [0m[32;1m Value[0m
[32;1m---- [0m [32;1m-----[0m
PSVersion 7.4.0-preview.2
PSEdition Core
GitCommitId 7.4.0-preview.2
OS Microsoft Windows 10.0.22621
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Visuals
No response