Pcornel
Windows · Registry

HKEY_LOCAL_MACHINE

Cheat sheet · https://pcornel.dk/topic.php?topic=3030

Back to the Topic

Answer

HKEY_LOCAL_MACHINE (HKLM) holds machine-wide configuration: hardware, drivers, services, installed software and security settings, stored in the SYSTEM, SOFTWARE, SAM and SECURITY hives.

Remember

  • Changing HKLM requires admin rights.
  • Policies may enforce values.
  • It maps to SYSTEM, SOFTWARE, SAM and SECURITY hives.

First checks

  • Get-ItemProperty 'HKLM:\<path>' — read values
  • reg query <key> /s — query in CMD
  • reg export <key> <file>.reg — back up a key
  • Get-Acl 'HKLM:\<path>' | fl — key permissions
  • Get-ChildItem 'HKLM:\' -ErrorAction SilentlyContinue — top-level keys

Verify in this order

HKLM root key → subkeys → values → read by Windows and applications

Where it usually breaks

First mismatch in target identity/version → persistent configuration/source of truth → provider/service/control plane → runtime/effective state → user/workload-visible result → event/log evidence; preserve identity/native error/pre-state before mutation.

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=3030

Confirmation

Confirm action

Continue?