FolderRisk: Caution
GroupPolicy C:\Windows\System32\GroupPolicy
C:\Windows\System32\GroupPolicy: the computer's local Group Policy Object (LGPO), edited with gpedit.msc and applied before domain policies.
What it’s for
GroupPolicy holds the computer’s local Group Policy Object (LGPO), the one you edit with gpedit.msc. It is applied before domain policies, which are not here: they live in AD DS and in the SYSVOL folder of domain controllers. The folder may not exist until a local policy has been configured.
What it contains
MachineandUser: computer and user configuration settings, inRegistry.pol(binary), along with startup and logon scripts.gpt.ini: the policy version tracking, updated on every change.- Local objects specific to a group or a user are not here. They sit in the neighboring
GroupPolicyUsersfolder, with one subfolder per SID (S-1-5-32-544for Administrators,S-1-5-32-545for non-administrators).
Risks and best practices
- Change the policy with
gpedit.mscorLGPO.exe(Security Compliance Toolkit), not in the files:Registry.polis binary andgpt.inihas to follow its changes. - On a domain machine, a domain policy wins over the local one in a conflict. A setting that comes back after you delete the local policy therefore comes from the domain, and
gpresultpoints to it. - To reset the local policy, back up the folder, delete its contents, then run
gpupdate /force. This erases every local setting and its effects.
Useful commands
# Contents (read-only)Get-ChildItem "$env:windir\System32\GroupPolicy" -Recurse -Force -ErrorAction SilentlyContinue | Select-Object FullName, LastWriteTime
# Report of applied policies, with the source GPO of each settinggpresult /h "$env:TEMP\gpresult.html"
# As administrator: back up before resettingCopy-Item "$env:windir\System32\GroupPolicy" "$env:USERPROFILE\Desktop\GroupPolicy-backup" -Recurse -WhatIf
# As administrator: reset the local policy (test with -WhatIf)# Remove-Item "$env:windir\System32\GroupPolicy\*" -Recurse -Force -WhatIf# gpupdate /force