Skip to content
Tutorials Center
My learning

Topics

Lesson 23 of 38 ยท Group Policy and Management

Troubleshooting Group Policy with gpresult and Event Logs

A practical method for finding why a GPO does not apply: gpupdate, gpresult, Resultant Set of Policy, event logs, SYSVOL and version checks, DNS and common causes.

Sooner or later someone says "the policy is not applying". Guessing wastes hours. A calm, ordered method finds the cause in minutes: confirm what the client thinks it received, compare it with what you expected, then check the usual suspects such as scope, filtering, replication and name resolution.

This lesson describes the Windows tools in words and read-only blocks (they run only on Windows domain members), and gives you runnable Python stand-ins that parse sample report text and walk a diagnostic checklist.

Step 1: Force a refresh

On the affected machine, from an elevated command prompt:

TEXT
gpupdate /force

/force re-applies all settings, not just the changed ones. Messages such as "Computer Policy update has completed successfully" are a good sign. If the command reports that it could not contact a domain controller, you have a network or DNS problem rather than a policy problem. Some settings ask for a sign-out or restart; do that before concluding anything.

Step 2: Ask the client what it applied

TEXT
gpresult /r
gpresult /scope computer /v
gpresult /h report.html

/r prints a summary: the site name, the domain controller used, the last time policy ran, and two lists per scope: Applied Group Policy Objects and The following GPOs were not applied because they were filtered out, with a reason. /h writes a full HTML report with every setting and its winning GPO. User and computer sections can differ, so run it for both (/scope user needs the user's own session, or use /user name as administrator).

The reasons you will see most often:

Reason in the report Meaning
Denied (Security) The account lacks Apply group policy or has a deny entry
Denied (WMI Filter) The WQL filter returned no result
Not Applied (Empty) The GPO has no settings in this half
Disabled (Link) / Disabled (GPO) The link or the half is switched off
Inaccessible (Security) The account cannot read the GPO (see MS16-072)

The GUI equivalent is the Group Policy Results Wizard in GPMC, which runs the same query remotely, and Group Policy Modeling for "what would apply if" planning.

Python Parse a gpresult-style summary (sample text)

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The sample is invented text in the same shape as the real output; the parser is a stand-in that shows how you could scan hundreds of reports.

Step 3: Check the event logs

Open Event Viewer on the client and look under Applications and Services Logs > Microsoft > Windows > GroupPolicy > Operational. The classic System log also records source GroupPolicy events. Useful events:

  • 4001, 4016, 5016, 5312: processing started and finished, with the time taken per extension (a long time for one client-side extension points at a slow filter or script).
  • 1058 / 1030: the client could not read the GPT in SYSVOL or the GPC from the directory. Usually name resolution, SMB access or a missing share.
  • 1096: a problem processing a specific extension (for example registry or drive maps).
  • 8001: a domain controller was found, which confirms the machine found its DC.

Turn on verbose logging only briefly, because it generates a lot of data.

Step 4: Check the server side

If the client looks healthy but the settings are not what you wrote, compare versions and replication.

  • Version mismatch. The GPC versionNumber (directory) must equal the version in GPT.INI inside the SYSVOL folder. GPMC shows both on the Details tab, "AD" and "Sysvol" versions, per domain controller. Mismatch means directory and file replication are not in step. See replication and sites.
  • SYSVOL and NETLOGON shares. Run net share on the DC; both shares must exist. DFSR health is checked with dfsrmig /getglobalstate, dfsrdiag and the DFS Replication event log.
  • Permissions. Authenticated Users need Read on the GPO and on the folder.
  • DNS. Clients find a DC through SRV records. nslookup -type=SRV _ldap._tcp.dc._msdcs.example.com should list your DCs. Wrong DNS servers on the client (an ISP resolver instead of a domain controller) cause the majority of "policy does not apply" calls.
  • Time and secure channel. A clock far off breaks Kerberos (see Kerberos errors); a broken secure channel needs Test-ComputerSecureChannel -Repair.

Step 5: Work through the scope questions

Many failures are simply scope. Ask in order:

  1. Is the object (user or computer) in the OU you think it is?
  2. Is the GPO linked, and are link and GPO enabled?
  3. Is the half you edited (computer or user) the half that applies to this object?
  4. Do security filtering or a WMI filter exclude it?
  5. Does a higher-precedence GPO override the setting? (precedence)
  6. Is loopback in use? (loopback)
  7. Is the setting supported on this OS version?
Python Diagnostic checklist walker

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Habits that prevent problems

  • Test GPOs on a pilot OU and a few machines before linking widely.
  • Back up GPOs with GPMC (right-click > Back Up) or the GroupPolicy PowerShell module before big edits.
  • Keep a naming convention and a description on each GPO so reports are readable.
  • Remove stale GPOs: GPMC shows which GPOs are unlinked.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. Which command prints a summary of the GPOs applied and filtered out on a client?

    gpresult /r reports applied GPOs and those filtered out, with reasons.
  2. 2. The report says a GPO was filtered with 'Denied (WMI Filter)'. What does that mean?

    A WMI filter must return at least one instance; otherwise the GPO is skipped for that machine.
  3. 3. The AD version of a GPO is 7 but its SYSVOL version is 6 on one domain controller. What is the likely issue?

    The container replicates through directory replication and the template through DFSR; mismatched versions mean one of them is behind.
  4. 4. Most 'GPO does not apply' tickets on a domain-joined laptop at home trace back to:

    Clients locate domain controllers through DNS; if DNS cannot resolve the domain SRV records, policy cannot be fetched.

Summary

  • Start with gpupdate /force, then gpresult /r or /h to see what the client applied and why GPOs were filtered.
  • Event Viewer's GroupPolicy Operational log shows timing and read failures.
  • Compare GPC and GPT versions, check SYSVOL, permissions and above all DNS.
  • Go through scope, filtering, precedence and loopback in order before suspecting anything exotic.

Next: Kerberos Concepts and Tickets