What is GPRESULT?
GPRESULT is a command line tool that displays the Resultant Set of Policy (RSoP) information for a target user and computer. GPRESULT works on local and remote computers.
In this guide, I will cover GPRESULT syntax, parameters and real examples you can apply in your day to day job as a Windows admin.
The syntax of GPRESULT is:
GPRESULT [/S ComputerName [/U username [/P [password]]]] [/SCOPE scope] [/USER targetusername] [/R | /V | /Z] [(/X | /H) [/F]]
Each parameter (switch) in the syntax affects the output of GPRESULT. In the next section, I will explain what each switch means.
The table below explains what each parameter means and how it can be used.
|1||/S ComputerName||Specifies a remote system to connect to.|
|2||/U [domain]\user||Used to enter the user with the right permission to connect to the computer specified with the /S switch.|
|3||/P [password]||Specifies the password for the user above|
|4||/SCOPE scope||Specifies whether to display user or the computer settings. Valid values: “USER”, “COMPUTER”.|
|5||/USER [domain]user||Specifies the user to display RSoP data for.|
|6||/X <filename>||Report is saved in XML format. Report is saved at the location specified by the parameter. <Filename> must be specified. If the path is not specified, the file will be saved in the directory the command is executed from.|
|7||/H <filename>||Saves the report as a HTML file at the location and with the <filename>. File name is required.|
|8||/F||Forces GPResult to overwrite existing files.|
|9||/R||Displays RSoP summary data.|
|10||/V||Specifies that verbose information should be displayed. Provides additional information|
|11||/Z||Outputs additional settings data (Super-verbose).|
|12||/?||Displays help information|
How to Use GPRESULT (Examples)
Below are some examples of how to use GPResult.
Use GPRESULT /H for HTML Reports
The /H parameter of GPResult command is used to generate RSoP in HTML format. Here is an example
GPRESULT /H GPReport.html
The command will create a HTML RSoP report with default values. Report is saved in the location the command was executed. In this instance, my drive C.
To save GPResult output in a different location, use the command below:
GPRESULT /H c:\RSoP\GPReport.html
The full path must exist. If the path does not exist you will receive an error message ERROR: The system cannot find the path specified.
The report is created in the path.
How to Create RSoP XML Report
To output your report in XML, use this command:
GPRESULT /X c:\RSoP\GPReport.xml
You must include .XML file extension in the file.
The XML file is in the location.
How to Run GPRESULT on a Remote Computer
Use the /S parameter as shown below:
GPRESULT /S DCSRV1 /U ITECHGUIDES\ADMINISTRATOR /R
Here is the result
Options /U, /P, /R, /V, /Z cannot be specified along with /X, /H.
You can pipe the last GPRESULT command to a text file as shown below:
GPRESULT /S DCSRV1 /U ITECHGUIDES\ADMINISTRATOR /R > E:\RSoP\GPResult.txt
The text file output
How to Show Computer Settings from GPRESULT
Use the /SCOPE switch as shown below:
GPRESULT /R /SCOPE COMPUTER
Getting the RSoP information of a computer or user, showing the Group Policy settings applied to the computer is very useful for troubleshooting GPO issues. I hope this has been helpful to you.
If you have any question or comment use the “leave a Reply” form at the end of the page. Alternatively, you could share your experience so other readers can benefit from it.
Other Helpful Guides
- PowerShell ForEach: Applications with examples
- PowerShell Get-Command: Syntax, Applications, Examples
- Windows Boot Manager: How to Edit Bootmgr and Fix Boot Errors in Windows 10