Windows gpresult /h Command

The gpresult /h command is used to print and display user and computer policies in HTML format. By default, the command line interface is used to display policies but by using the /h option the policy information can be exported into the HTML format.

gpresult /h Syntax

The gpresult /h command has the following simple syntax.

gpresult OPTION /h REPORT_PATH
  • OPTION is used to specify different options to gpresult command like user policies , computer policies etc.
  • REPORT_PATH is the HTML report name or report name with absolute path.

Export GPO As HTML

The “gpresult /h” command is simply used to print user and computer policy summaries into an HTML file. In the following example, we export the GPO summary into an HTML file named GPO_REPORT.html .

> gpresult /h GPO_REPORT.html

Export GPO As HTML To Specified Path

Alternatively, we can specify a different path than the current working directory. In the following example, we will put it into the D:\ .

> gpresult /h D:\GPO_REPORT.html

Export User GPO As HTML

The “gpresult /h” command can be used to put only user GPO into HTML report by using the /scope:user like below.

> gpresult /scope:user /h D:\GPO_REPORT.html

Export Computer GPO As HTML

The “gpresult /h” command can be used to put only computer GPO into HTML report by using the /scope:computer like below.

> gpresult /scope:computer /h D:\GPO_REPORT.html

Leave a Comment