|

How To Use The Gpresult Command In Windows (2027)

Gpresult is a built-in Windows command that shows which Group Policy settings are in effect.

It is the quickest way to confirm whether a policy reached your PC or user account.

This guide covers the options Microsoft documents and what each one is for.

Table of Contents

Gpresult quick answer

Open Command Prompt and run gpresult /r to see which Group Policy settings Windows applied to the current user and computer.

Add /h and a file name when you want a full HTML report you can open in a browser.

GoalCommand
Summary for user and computergpresult /r
User settings onlygpresult /scope user /r
Computer settings onlygpresult /scope computer /r
Verbose settingsgpresult /v
All available informationgpresult /z
HTML reportgpresult /h report.html
XML reportgpresult /x report.xml

What the gpresult command does

Gpresult displays Resultant Set of Policy (RSoP) information for a user and a computer.

Group Policy defines how programs, network resources and the operating system behave for users and computers in an organization.

Because policy settings can overlap, Windows works out a resulting set of settings when the user signs in.

Gpresult shows that resulting set, meaning the settings that were actually enforced for the specified user.

Microsoft lists Windows 11 and Windows 10 among the systems it applies to.

Before you start

Gpresult needs an output option, so a bare gpresult command does not work.

Microsoft says that, except when you use /?, you must include one of /r, /v, /z, /x or /h.

  1. Select Start and type Command Prompt.
  2. Open the Command Prompt result.
  3. Type the command you need and press Enter.

Show a summary of applied policies

The /r option displays RSoP summary data.

  1. Open Command Prompt.
  2. Type gpresult /rand press Enter.
  3. Scroll through the output for the computer and user sections.

If you leave out /scope, gpresult displays data for both the user and the computer.

Show only user or computer settings

The /scope parameter limits the output to one side.

CommandResult
gpresult /scope user /rRSoP summary for the user only
gpresult /scope computer /rRSoP summary for the computer only

Show verbose or complete policy data

The /v option displays verbose policy information, including detailed settings applied with a precedence of 1.

The /z option displays all available information about Group Policy, including detailed settings applied with a precedence of 1 and higher.

Both produce a lot of text, so Microsoft suggests sending the output to a text file.

gpresult /z >policy.txt

Open policy.txt in Notepad to search it.

Save an HTML or XML report

The /h option saves the report as HTML and the /x option saves it as XML, at the path and file name you give.

Add /f to overwrite a file that already exists.

  1. Open Command Prompt.
  2. Type gpresult /h C:\Temp\report.html /fand press Enter.
  3. Open the saved file in your browser.

This example path is only an illustration, so use any folder that exists on your PC.

Microsoft says /x and /h cannot be combined with /u, /p, /r, /v or /z.

Check another computer or user

Use /s with the name or IP address of a remote computer, without backslashes.

Use /user to name the user whose RSoP data you want.

Microsoft gives this example for a remote user on a computer called srvmain.

gpresult /s srvmain /user maindom\targetuser /scope user /r

Microsoft also notes that RSoP reporting for remote computers through a firewall needs rules that allow inbound network traffic on the required ports.

Run it with different credentials

The /u parameter runs the command with the credentials of the user you specify.

The /p parameter supplies that account password, and if you omit the password after /p, gpresult prompts for it.

Leaving the password off keeps it out of your command history, so prefer the prompt.

gpresult /s srvmain /u maindom\hiropln /p /r

All gpresult parameters

ParameterWhat it does
/s <system>Remote computer name or IP address; default is the local computer
/u <username>Runs with that user’s credentials
/p [<password>]Password for /u; prompts if omitted; not usable with /x or /h
/userRemote user whose RSoP data is shown
/scope {user | computer}Shows only user or only computer data
/x or /h <filename>Saves an XML or HTML report
/fOverwrites the file named with /x or /h
/rRSoP summary data
/vVerbose policy information
/zAll available Group Policy information
/?Help

Common problems

ProblemCause from Microsoft’s page
Command shows nothing usefulNo output option was included; add /r, /v, /z, /x or /h
/h or /x rejectedThey cannot be used with /u, /p, /r, /v or /z
/h fails on ARM64 WindowsOnly the gpresult in SysWow64 works with /h on ARM64
Remote report failsFirewall rules for inbound RSoP traffic may be missing

After you change a policy

Gpresult only reports what was already applied, so it does not refresh policy.

To apply new settings first, read our guide to the Gpupdate command in Windows and then run gpresult again.

If a remote computer will not answer, our Nslookup command guide helps you check that its name resolves.

Our Net Use command guide covers connecting to a shared resource on another PC.

Which output option to choose

OptionBest forOutput type
/rA quick check of what appliedSummary on screen
/vDetailed settings applied with a precedence of 1Verbose text on screen
/zEverything Windows can report, including precedence 1 and higherVery long text, so redirect it to a file
/hReading and sharing a reportHTML file
/xProcessing the report with other toolsXML file

Start with /r, because it is the shortest, and move to /v or /z only when the summary does not answer your question.

Choose /h when you need a file you can open in a browser or send to a colleague.

Full syntax

Microsoft documents the command in this form, where square brackets mark optional parts.

gpresult [/s <system> [/u <username> [/p [<password>]]]] [/user [<targetdomain>\]<targetuser>] [/scope {user | computer}] {/r | /v | /z | [/x | /h] <filename> [/f] | /?}

Read it left to right: first choose where to run it, then whose data to show, then which scope, and finally one output option.

Examples from Microsoft

Microsoft lists three examples, all aimed at a remote computer named srvmain in the domain maindom.

GoalCommand
RSoP data for one remote user onlygpresult /s srvmain /user maindom\targetuser /scope user /r
All Group Policy information for that user, saved to policy.txtgpresult /s srvmain /user maindom\targetuser /z > policy.txt

Replace the computer, domain and user names with your own before you run any of them.

Sources

Microsoft Learn: gpresult.

Microsoft Learn: Command-Line Syntax Key.

Leave a Reply

Your email address will not be published. Required fields are marked *