Run a Command Elevated with Start-Process -Verb RunAs
Trigger the UAC prompt and launch an admin-level process from a non-elevated PowerShell session.
01Command
$ Start-Process powershell -Verb RunAs -ArgumentList '-Command', 'Get-EventLog System -Newest 5'02What it does
A non-admin PowerShell cannot simply 'sudo' into another command — Start-Process -Verb RunAs is the built-in way to request elevation, spawning a new process under the UAC prompt. The elevated process runs in its own window and its output is not returned to the caller, so capture results with -RedirectStandardOutput or have the child write to a file. -Wait makes the script block until the elevated process exits, which is what you want when the following lines depend on it.
03Risk
04Undo
✓No undo needed — this command does not change persistent state.
05Sources
- Start-Process - SS64Evidence: Shows -Verb RunAs examples and notes that output of the elevated process is not captured.
- Start-ProcessEvidence: Documents the -Verb RunAs parameter for UAC elevation.
Last verified: 2026-09-17 · Category: System & Settings
06Related solutions
Search inside text files and logs with regex, returning file, line number and match.
Create or update a .zip from any files or folder contents straight from PowerShell.
A built-in PowerShell one-liner that answers 'is port 5432/3389/443 actually open through this network?' — no telnet client needed.