PowerShell icon indicating copy to clipboard operation
PowerShell copied to clipboard

start-process with credentials leaks a process

Open jjsmeets opened this issue 2 years ago • 0 comments

Prerequisites

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

jjsmeets avatar Apr 03 '23 20:04 jjsmeets