HKEY_LOCAL_MACHINE
Cheat sheet · https://pcornel.dk/topic.php?topic=3030
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 valuesreg query <key> /s— query in CMDreg export <key> <file>.reg— back up a keyGet-Acl 'HKLM:\<path>' | fl— key permissionsGet-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