How to prompt to run EXE as different user in powershell How to prompt to run EXE as different user in powershell powershell powershell

How to prompt to run EXE as different user in powershell


This is a simple operation.

Start-Process "c:\windows\system32\notepad.exe" -Credential $(Get-Credential)

Using Get-Credential will prompt the user for credentials, You can also store it in a variable.

$Creds = Get-CredentialStart-Process "c:\windows\system32\notepad.exe" -Credential $Creds


change directory to .exe directory and run below command

runas /netonly /user:<domain\username> .\<app name>


Try following

Start-Process notepad.exe -Verb RunAsUser