Check the User Account Control (UAC) level on Windows
Read EnableLUA and ConsentPromptBehaviorAdmin from the registry to see the current UAC settings.
01Command
$ reg query "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v EnableLUA & reg query "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v ConsentPromptBehaviorAdmin02What it does
UAC is the prompt that appears when something tries to run with admin rights, and 'optimization' tweaks or malware sometimes weaken it. EnableLUA set to 0x1 means UAC is active, and ConsentPromptBehaviorAdmin controls how loudly it warns (0 = elevate silently, 5 = default prompt for non-Microsoft apps). A read-only reg query shows both without changing anything.
03Risk
04Undo
✓No undo needed — this command does not change persistent state.
05Sources
- Reg - Read and edit the registryEvidence: reg query syntax for reading the UAC values.
- How User Account Control worksEvidence: Describes the UAC registry values under HKLM Policies\System, including EnableLUA and ConsentPromptBehaviorAdmin.
Last verified: 2026-09-18 · Category: Security & Privacy
06Related solutions
Understand PowerShell's execution policy scopes and set the one that lets you run your own local scripts without gutting the security model.
Two-step command sequence that makes you the owner of a locked file tree and grants yourself full control — the standard fix for 'Access is denied' on old profiles and OS reinstall leftovers.
Built-in Windows command to compute MD5, SHA1 or SHA-256 hashes of any file.