Partager via


Gpresult

Displays Group Policy settings and Resultant Set of Policy (RSOP) for a user or a computer.

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.

Remarks

  • 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.

Examples

The following examples show how you can use the gpresult command:

gpresult /user targetusername /scope computer
gpresult /s srvmain /u maindom\hiropln /p p@ssW23 /user targetusername /scope USER
gpresult /s srvmain /u maindom\hiropln /p p@ssW23 /user targetusername /z >policy.txt
gpresult /s srvmain /u maindom\hiropln /p p@ssW23

Formatting legend

Format

Meaning

Italic

Information that the user must supply

Bold

Elements that the user must type exactly as shown

Ellipsis (...)

Parameter that can be repeated several times in a command line

Between brackets ([])

Optional items

Between braces ({}); choices separated by pipe (|). Example: {even|odd}

Set of choices from which the user must choose only one

Courier font

Code or program output

Command-line reference A-Z

Using command redirection operators