Redirecting output results of the gpresult command


If you want to redirect the output of the gpresult command to a text file use this command:

gpresult > results.txt (sends results to a file name results.txt)
note: the /z parameter generates the most comprehensive results of all the GP setings available
e.g.: gpresult /z
or gpresult /z > results.txt

BTW (by the way) gpresult displays Group Policy settings and Resultant Set of Policy (RSoP) for a user or a computer

Group policy definition:

Group Policy is the primary administrative tool for defining and controlling how programs, network resources, and the operating system operate for users and computers in an organization. In an Active Directory environment, Group Policy is applied to users or computers on the basis of their membership in sites, domains, or organizational units.

Because you can apply overlapping levels of policies to any computer or user, the Group Policy feature generates a resulting set of policies at logon. Gpresult displays the resulting set of policies that were enforced on the computer for the specified user at logon.

Syntax

gpresult [/s Computer [/u Domain\User /p Password]] [/user TargetUserName] [/scope {user|computer}] [/v] [/z]
Parameters

/s Computer : Specifies the name or IP address of a remote computer. (Do not use backslashes.) The default is the local computer.

/u Domain \ User : Runs the command with the account permissions of the user that is specified by User or Domain\User. The default is the permissions of the current logged-on user on the computer that issues the command.

/p Password : Specifies the password of the user account that is specified in the /u parameter.

/user TargetUserName : Specifies the user name of the user whose RSOP data is to be displayed.

/scope { user | computer } : Displays either user or computer results. Valid values for the /scope parameter are user or computer. If you omit the /scope parameter, gpresult displays both user and computer settings.

/v : Specifies that the output display verbose policy information.

/z : Specifies that the output display all available information about Group Policy. Because this parameter produces more information than the /v parameter, redirect output to a text file when you use this parameter (for example, gpresult /z >policy.txt).

/? : Displays help at the command prompt.

source: http://technet.microsoft.com/en-us/library/bb490915.aspx

This is an actual example when issuing the gpresult command for an user named johndoe. Note the /scope user and the /scope computer parameters

C:\Documents and Settings\Johndoe>gpresult /user johndoe /scope user

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

Created On 8/1/2011 at 11:17:19 PM

RSOP results for ROSEBUD\Johndoe on ROSEBUD : Logging Mode
—————————————————————

OS Type: Microsoft Windows XP Professional
OS Configuration: Standalone Workstation
OS Version: 5.1.2600
Domain Name: ROSEBUD
Domain Type: N/A
Site Name: N/A
Roaming Profile:
Local Profile: C:\Documents and Settings\Johndoe
Connected over a slow link?: Yes

USER SETTINGS
————–

Last time Group Policy was applied: 8/1/2011 at 10:53:56 PM
Group Policy was applied from: N/A
Group Policy slow link threshold: 500 kbps

Applied Group Policy Objects
—————————–
N/A

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

The user is a part of the following security groups:
—————————————————-
None
Everyone
Debugger Users
BUILTIN\Administrators
BUILTIN\Users
NT AUTHORITY\INTERACTIVE
NT AUTHORITY\Authenticated Users
LOCAL

C:\Documents and Settings\Josivaldo>gpresult /user johndoe /scope computer

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

Created On 8/1/2011 at 11:17:36 PM

RSOP results for ROSEBUD\Johndoe on ROSEBUD : Logging Mode
—————————————————————

OS Type: Microsoft Windows XP Professional
OS Configuration: Standalone Workstation
OS Version: 5.1.2600
Domain Name: ROSEBUD
Domain Type: N/A
Site Name: N/A
Roaming Profile:
Local Profile: C:\Documents and Settings\Johndoe
Connected over a slow link?: Yes

COMPUTER SETTINGS
——————

Last time Group Policy was applied: 8/1/2011 at 11:02:56 PM
Group Policy was applied from: N/A
Group Policy slow link threshold: 500 kbps

Applied Group Policy Objects
—————————–
N/A

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
NT AUTHORITY\Authenticated Users

C:\Documents and Settings\JohnDoe>

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: