What is GPRESULT and how it helps you

GPRESULT, or otherwise known as Resultant Set of Policy Queries is a tool used to provide client end information of Group Policy settings.
The utility ships with all current versions of Windows and is used to aid administrators in troubleshooting group policy problems. The policy is very similar between all versions of Windows, however Windows Vista and Windows 7 requires elevation.

The commands below are examples that i use frequently.

Windows XP

This provides verbose log of current logged on user on local PC

gpresult /v > gp.txt

This provides verbose logs of a remote PC for a particular user. This needs to be run using a domain admin account

gpresult /s COMPUTERNAME /user TargetUserName /v > c:\gp.txt

Alternatively you can use the following command:

gpresult /s COMPUTERNAME /user TargetUserName /u Domain\User /p Password /v > c:\gp.txt

Windows 7

Command prompt must be elevated.
This provides verbose log of current logged on user on local PC

gpresult /v > c:\gp.txt

This provides verbose logs of a remote PC for a particular user. This needs to be run using a domain admin account.

gpresult /s COMPUTERNAME /user TargetUserName /v > c:\gp.txt

Here is an example of what the GPRESULT output looks like:

C:\Windows\system32>gpresult /R

Microsoft (R) Windows (R) Operating System Group Policy Result tool v2.0
Copyright (C) Microsoft Corp. 1981-2001

Created On 7/1/2010 at 11:03:18 AM

RSOP data for CORP\pryans on AARYAN3 : Logging Mode
----------------------------------------------------

OS Configuration:            Member Workstation
OS Version:                  6.1.7600
Site Name:                   Default-First-Site-Name
Roaming Profile:             N/A
Local Profile:               C:\Users\pryans
Connected over a slow link?: No

COMPUTER SETTINGS
------------------
    CN=AARYAN3,OU=7,OU=Vista,OU=Computers,OU=AnnArbor,DC=corp,DC=xxxx,DC=local
    Last time Group Policy was applied: 7/1/2010 at 10:38:22 AM
    Group Policy was applied from:      aadc1.corp.xxxx.local
    Group Policy slow link threshold:   500 kbps
    Domain Name:                        CORP
    Domain Type:                        Windows 2000

    Applied Group Policy Objects
    -----------------------------
        Spark
        General
        Default Domain Policy

    The following GPOs were not applied because they were filtered out
    -------------------------------------------------------------------
        Local Group Policy
            Filtering:  Not Applied (Empty)

    The computer is a part of the following security groups
    -------------------------------------------------------
        BUILTIN\Administrators
        Everyone
        SQLServerMSSQLServerADHelperUser$AARYAN3
        BUILTIN\Users
        NT AUTHORITY\NETWORK
        NT AUTHORITY\Authenticated Users
        This Organization
        AARYAN3$
        Domain Computers
        CERTSVC_DCOM_ACCESS
        System Mandatory Level

USER SETTINGS
--------------
    CN=Spencer xxxx,OU=Users,OU=AnnArbor,DC=corp,DC=xxxx,DC=local
    Last time Group Policy was applied: 7/1/2010 at 10:32:18 AM
    Group Policy was applied from:      aadc1.corp.xxxx.local
    Group Policy slow link threshold:   500 kbps
    Domain Name:                        CORP
    Domain Type:                        Windows 2000

    Applied Group Policy Objects
    -----------------------------
        Spark-Config
        IEZone-STD
        IEZone-Adv
        General
        Default Domain Policy

    The following GPOs were not applied because they were filtered out
    -------------------------------------------------------------------
        Accounting
            Filtering:  Denied (Security)

        QuickLock
            Filtering:  Denied (Security)

        Local Group Policy
            Filtering:  Not Applied (Empty)

    The user is a part of the following security groups
    ---------------------------------------------------
        Domain Users
        Everyone
        Offer Remote Assistance Helpers
        BUILTIN\Users
        NT AUTHORITY\INTERACTIVE
        CONSOLE LOGON
        NT AUTHORITY\Authenticated Users
        This Organization
        LOCAL
        Pxxxxxxxxxxxxxx

C:\Windows\system32>

More information about GPRESULT can be found here:
http://technet.microsoft.com/en-us/library/cc733160(WS.10).aspx

  1. Updated syntax errors in above scripts.

Leave a Reply

QR Code Business Card
%d bloggers like this: