Check the UAC Setting from the Registry (PowerShell)
Read whether User Account Control is enabled and which admin-approval prompt level Windows uses.
01Command
$ Get-ItemProperty 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System' | Select-Object EnableLUA, ConsentPromptBehaviorAdmin02What it does
EnableLUA 1 means UAC is active, while 0 means the "tweak" that silently elevates everything was applied — a serious downgrade in security. ConsentPromptBehaviorAdmin sets the prompt level: 5 is the default "dim and ask", 0 elevates without asking, and 2 always asks for credentials. Registry tweakers and some "optimizer" scripts silently flip these, so it is worth checking on any second-hand or shared PC.
03Risk
04Undo
✓No undo needed — this command does not change persistent state.
05Sources
- User Account Control: Settings and configurationEvidence: Documents the UAC registry values under HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System, including EnableLUA and ConsentPromptBehaviorAdmin prompt levels.
Last verified: 2026-09-18 · Category: Security & Privacy
06Related solutions
Read the Authenticode signature status and signer of any executable or script in PowerShell.
Understand PowerShell's execution policy scopes and set the one that lets you run your own local scripts without gutting the security model.
Search inside text files and logs with regex, returning file, line number and match.