What Group Policy does
Group Policy is the Windows mechanism that applies configuration to computers and users from a central definition. A Group Policy Object (GPO) holds the settings. Client-side extensions (CSEs) on each machine read the GPOs that apply and turn them into registry values, security database entries, scripts, scheduled tasks, drive maps and so on.
Every GPO has two halves:
- Computer Configuration: applies to the machine at startup and on every background refresh. Registry settings go to
HKLM. - User Configuration: applies to the user at logon and on every background refresh. Registry settings go to
HKCU(the user'sNTUSER.DAT).
Each half is split again into Policies (Software Settings, Windows Settings, Administrative Templates) and, in domain GPOs, Preferences (Windows Settings and Control Panel Settings).
Local Group Policy
Every Windows Pro, Enterprise, Education and Server installation has a local GPO. Windows Home does not include the Local Group Policy Editor.
| Local policy layer | Stored in | Applies to |
|---|---|---|
| Local Computer Policy | %windir%\System32\GroupPolicy | The computer and every user |
| Administrators / Non-Administrators | %windir%\System32\GroupPolicyUsers\<SID> | User settings for members (or non-members) of local Administrators |
| User-specific local policy | %windir%\System32\GroupPolicyUsers\<user SID> | User settings for one local account |
| Local security policy | Security database %windir%\security\database\secedit.sdb | Account, audit, user rights and security options |
These are the multiple local GPOs (MLGPO). Open a specific layer by adding the Group Policy Object Editor snap-in in mmc.exe and choosing Browse > Users. User layers apply in the order Local Computer Policy, then Administrators or Non-Administrators, then user-specific, and the last one wins.
Local policy applies first and every domain GPO applies after it, so a domain setting always beats a conflicting local setting. The policy Turn off Local Group Policy Objects processing (Computer Configuration > Administrative Templates > System > Group Policy) makes domain-joined machines ignore local GPOs entirely.
Domain Group Policy: GPC and GPT
A domain GPO is two objects that must stay in step:
- Group Policy Container (GPC): an AD object
CN={GUID},CN=Policies,CN=System,DC=…with the display name, status, version number, WMI filter link (gPCWQLFilter) and the list of CSEs in use. Replicates with Active Directory. - Group Policy Template (GPT): the folder
\\<domain>\SYSVOL\<domain>\Policies\{GUID}withGPT.INI,Machine\Registry.pol,User\Registry.pol, security templates (GptTmpl.inf), scripts and preference XML. Replicates with DFSR.
Links are stored on the target, not on the GPO: each site, domain and OU has a gPLink attribute that lists linked GPOs with a flag (enabled, disabled, enforced), and a gPOptions attribute where 1 means Block Inheritance.
The version number counts edits for each half: the lower 16 bits are the computer version and the upper 16 bits the user version. When the AD version and the SYSVOL version differ on a DC, GPMC shows a mismatch and clients may apply an old copy. See Troubleshooting.
Client-side extensions
Each settings area has a CSE, registered under HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\GPExtensions. The Group Policy service (gpsvc) builds the list of GPOs in scope and hands each one to the CSEs that the GPO uses.
- Registry: Administrative Templates (
Registry.pol). - Security: account policies, user rights, security options, restricted groups, services, file and registry ACLs.
- Advanced Audit Policy, Scripts, Folder Redirection, Software Installation, Wireless and Wired network policies, Windows Firewall with Advanced Security, Public Key policies, Software Restriction and AppLocker.
- Group Policy Preferences: 20 extensions such as Drive Maps, Printers, Registry, Files, Local Users and Groups, Scheduled Tasks and Shortcuts.
By default most CSEs only run when something changed (a GPO was added, removed or its version went up). gpupdate /force makes every CSE reapply everything.
Policies vs Preferences
| Policies (Administrative Templates) | Preferences | |
|---|---|---|
| Where values go | Policies registry branches (SOFTWARE\Policies, …\CurrentVersion\Policies) | Wherever you choose: the real application keys, files, tasks, drives |
| User can change it | No, the UI is greyed out | Yes, until the next refresh reapplies it (unless "Apply once") |
| When the GPO stops applying | Value removed, default comes back | Value stays (tattoo) unless "Remove this item when it is no longer applied" is ticked |
| Targeting | Whole GPO (links, security and WMI filters) | Per item, with item-level targeting |
The full persistence rules, including security settings, are on Registry: what persists.
Processing order: LSDOU
- Local GPOs
- Site-linked GPOs
- Domain-linked GPOs
- OU-linked GPOs, from the top OU down to the OU that holds the user or computer
Settings that conflict are resolved by "last writer wins", so the GPO linked closest to the object wins. Within one container, link order 1 has the highest precedence because it applies last. Settings that don't conflict are merged. Enforced links and Block Inheritance change this order; see Scope and filtering.
Computer settings come from the computer object's OU path. User settings come from the user object's OU path, whatever computer the user signs in to, unless loopback is on.
When policy applies
- Foreground: computer policy at startup, user policy at logon.
- Background refresh: every 90 minutes with a random offset of up to 30 minutes on members, every 5 minutes on domain controllers. Change it with Set Group Policy refresh interval for computers and …for domain controllers.
- On demand:
gpupdate,gpupdate /force,Invoke-GPUpdateor GPMC's Group Policy Update… on an OU.
Windows clients use asynchronous foreground processing by default (Fast Logon Optimization): the user gets the desktop before policy finishes. Settings that can only apply in the foreground, such as Software Installation and Folder Redirection, then need one more restart or logon. Turn on Always wait for the network at computer startup and logon (Computer Configuration > Administrative Templates > System > Logon) when those must apply on the first attempt.
Slow links: when the connection to the DC is slower than the threshold (500 kbps by default, Configure Group Policy slow link detection), some CSEs skip processing, for example Software Installation and Folder Redirection. Registry and Security policy always apply.
Loopback processing
Loopback makes user settings depend on the computer's OU. Set Configure user Group Policy loopback processing mode in Computer Configuration > Administrative Templates > System > Group Policy on a GPO that applies to the computers.
- Merge: the user's normal GPOs apply, then the user settings from GPOs in the computer's scope apply on top and win conflicts.
- Replace: only the user settings from GPOs in the computer's scope apply. Use it for kiosks, labs, RDS session hosts and Citrix VDAs.
With loopback, the user settings still pass security filtering for the user, so the user (or Authenticated Users) needs Read and Apply on those GPOs.
Group Policy, Intune and MDM
Microsoft Intune and other MDM tools set many of the same Administrative Template settings through the Policy CSP, and Intune's Group Policy analytics imports GPO backups to show which settings have an MDM equivalent. On a device that gets both, the MDMWinsOverGP setting (Policy CSP ControlPolicyConflict) decides which wins for supported policies. Group Policy still needs line of sight to a domain controller; MDM works over the internet.
References: Group Policy preferences, Applying Group Policy troubleshooting guidance.