The short answer
| Setting type | Written to | When it stops applying* |
|---|---|---|
| Administrative Template writing to a Policies branch (almost all of them) | SOFTWARE\Policies or …\CurrentVersion\Policies in HKLM or HKCU | Removed at the next policy processing. The application falls back to its default or the user's own choice. |
| Administrative Template writing outside those branches | Real application or system keys, for example HKLM\SYSTEM\CurrentControlSet\Control\FileSystem | May persist ("tattoo"). Set the policy to the value you want (often Disabled) and let it apply before removing it. |
| Group Policy Preferences (Registry and other items) | Anywhere | Persists, unless the item has Remove this item when it is no longer applied. |
Set-GPRegistryValue with a non-policy key | Anywhere you pointed it | Persists. Removing it from the GPO does not delete the value on clients; use -Disable first. |
| Security Settings (user rights, security options, account policy, services, restricted groups, file and registry ACLs) | Local security database and the matching system locations | Mostly roll back to the value saved before the policy set them, but persist when there was no previous value, for file system and registry ACLs, and on domain controllers. |
| Old custom .adm "preferences" | Non-policy keys | Persists. That is exactly why the editor hides them unless you turn off "Show Policies Only". |
* The setting is set back to Not Configured, removed from the GPO, or the GPO is unlinked, filtered out or deleted.
True policies: the four Policies branches
Microsoft defines true settings as registry-based policies that "must use registry entries in the Software\Policies or Software\Microsoft\Windows\CurrentVersion\Policies registry subkeys", and calls anything stored elsewhere a preference, which Group Policy doesn't fully manage. In the registry that means four branches:
HKLM\SOFTWARE\PoliciesandHKCU\SOFTWARE\PoliciesHKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\PoliciesandHKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies
How the cleanup works: the Registry client-side extension keeps a record of the values it applied (per computer, and per user in the hidden ntuser.pol in the profile). When the list of GPOs changes or a GPO's version goes up, it deletes the values it applied last time in these branches and writes the new set. A value that is no longer in any applicable GPO is therefore gone after the next processing.
Applications read their Policies key first and the normal settings key second. That is why removing a policy instantly "un-greys" the setting in the UI but keeps the user's own earlier choice: the user's value in the normal key was never touched.
Tattooing: what stays behind
A value written outside the Policies branches is not tracked for cleanup, so it stays when the GPO goes away. The registry keeps it until something else changes it. In the policy browser's persistence list every such Administrative Template policy is flagged. In the current Windows templates they include, for example:
- Enable Win32 long paths (
HKLM\SYSTEM\CurrentControlSet\Control\FileSystem,LongPathsEnabled). - Set maximum Kerberos SSPI context token buffer size (
…\Control\Lsa\Kerberos\Parameters). - The Secure Boot certificate deployment policies (
HKLM\SYSTEM\CurrentControlSet\Control\SecureBoot). - TCP/IP, power throttling, display, event log access (legacy) and Windows Hello biometrics settings.
- In the Microsoft 365 Apps templates, the Internet Explorer FeatureControl security settings under
…\Internet Explorer\Main\FeatureControl.
Some Windows policies write to HKLM\SYSTEM\CurrentControlSet\Policies (file system, BitLocker write protection, early launch anti-malware). That is a policies key by name, but it is not one of the four branches Microsoft documents for cleanup, so the policy browser flags these too. Treat them as "may persist" and test on your build.
Before removing a GPO that contains a tattooing setting, first change the setting to the value you want left behind (usually Disabled, or the default), let every machine apply it, and only then unlink or delete the GPO.
Preferences and their two options
- Default: the preference writes the value at every refresh and leaves it in place forever, even when the GPO no longer applies.
- Remove this item when it is no longer applied (Common tab): Windows records the item and deletes what it created when the item falls out of scope (GPO unlinked, filtered out, item-level targeting false, item deleted). It forces the action to Replace. The record is kept per machine in
C:\ProgramData\Microsoft\Group Policy\History(computer) and%LOCALAPPDATA%\Microsoft\Group Policy\History(user), so don't rely on it for roaming user profiles. - Apply once and do not reapply: writes the value once and lets the user change it.
- Delete action: actively removes a value, key, file, drive or task. Use it to clean up tattoos from old GPOs.
Deleting a GPO that holds preference items with the remove option is not always enough: the client must still process that GPO's removal. Prefer to unlink or filter first, let clients process, then delete.
Security settings and the tattoo table
The Security client-side extension stores every security setting it applies in the local security database %windir%\security\database\secedit.sdb, including a table of earlier values (Microsoft literally calls it the tattoo table) for rollback. When a GPO stops defining a security setting:
- if the database holds the value that was in place before the policy, the setting rolls back to it;
- if no previous value was recorded, the setting stays as the policy left it;
- file system and registry permissions set by policy stay until something sets them again;
- on domain controllers, security settings stay.
Security Options that are stored as registry values (for example EnableLUA under HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System) are written by the Security extension, not the Registry extension, so they follow these security rules even though they sit in a Policies branch. Check the effective result with secedit /export /mergedpolicy /cfg C:\effective.inf and auditpol /get /category:*.
Other extensions have their own options: Folder Redirection has Policy Removal (leave the folder redirected or redirect it back), Software Installation has Uninstall this application when it falls out of the scope of management, and Restricted Groups memberships stay as they were last set.
When a change shows up in the registry
- Edit in GPMC: the Group Policy Management Editor writes
Registry.polinto the GPO's SYSVOL folder on the DC you are connected to (the PDC emulator by default) and increases the version. Nothing changes on clients yet. - Replication: AD replicates the version (GPC) and DFSR replicates the file (GPT) to the client's DC: seconds inside a site, up to the site link schedule between sites.
- Next processing on the client: background refresh every 90 ± 30 minutes (5 minutes on DCs), at startup or logon, or immediately with
gpupdate,Invoke-GPUpdateor GPMC Group Policy Update…. The Registry extension then rewrites the Policies values in one pass. - The component reads it: many components read the value at once (Explorer and most Settings pages update quickly); services read it when they start; some settings need a sign-out or restart, which the policy's explain text says.
- By default the Registry extension only reapplies when something changed. If a user or admin edits a value under a Policies key by hand, it stays wrong until the next change or a
gpupdate /force. Enable Configure registry policy processing > Process even if the Group Policy objects have not changed to reapply on every refresh. - The Security extension reapplies its settings every 16 hours even when nothing changed.
- Settings that only apply in the foreground (Software Installation, Folder Redirection, some logon settings) need a restart or logon, not a background refresh.
Checking on a machine
# What policy values are set right now
reg query HKLM\SOFTWARE\Policies /s
reg query HKCU\SOFTWARE\Policies /s
Get-ChildItem HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies -Recurse
# Which GPO wrote it
gpresult /h C:\gp.html /f # Settings section shows the winning GPO per setting
# Watch the change happen
procmon.exe # filter Operation = RegSetValue / RegDeleteValue, then run gpupdate /force
Look up any key or value on registry.cloudschool.ai to see the policy that writes it, its allowed values and whether it is cleaned up or tattoos.
References: Policy CSP: true settings vs preferences, Group Policy preferences, Remove this item option, How the Security Settings extension works, Remove-GPRegistryValue.