Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

GPO Report PowerShell: How to Generate It

· 4 min read · Home Tech

In this article
  1. Formula
  2. Worked Example
  3. What Is a GPO Report?
  4. Prerequisites
  5. How to Generate a GPO Report
  6. Reading the Report
  7. Common Issues and Troubleshooting
  8. Alternatives to Get-GPOReport
  9. Frequently Asked Questions

This article explains how to generate a Group Policy Object (GPO) report using PowerShell, covering both the built-in cmdlets in the Group Policy Management module and alternative methods for environments without that module. You will learn the exact commands, how to read the output, and how to troubleshoot common issues.

in t | Time (minutes) | min | 30 | 0
out pace | Average pace | min/km | t / 10 | 2
out speed | Average speed | km/h | 10 / (t / 60) | 2

Formula

The calculator above is a placeholder for demonstration purposes; the real content of this page is the PowerShell guide. The formula for average pace is:

pace = time / distance

where time is in minutes and distance is in kilometers. The average speed is distance / (time / 60) in km/h.

Worked Example

Using the default values: time = 30 minutes, distance = 10 km. Pace = 30 / 10 = 3.0 min/km. Speed = 10 / (30/60) = 20.0 km/h.

What Is a GPO Report?

A GPO report in PowerShell is an HTML or XML file that shows the settings contained in one or more Group Policy Objects. It includes computer and user configuration, administrative template settings, security options, and more. The report is useful for documentation, auditing, and troubleshooting.

Prerequisites

To generate a GPO report with PowerShell, you need:

  • PowerShell 3.0 or later (most modern systems have 5.1 or 7.x).
  • The Group Policy Management feature installed on the machine (usually via RSAT – Remote Server Administration Tools).
  • Administrative rights on the domain or local machine, depending on the GPO scope.
  • The Active Directory PowerShell module may also be required for some cmdlets.

How to Generate a GPO Report

The primary cmdlet is Get-GPOReport from the GroupPolicy module. Here is the basic syntax:

Get-GPOReport -Name "Default Domain Policy" -ReportType Html -Path "C:\Reports\DefaultDomainPolicy.html"

This exports the report for a single GPO. For all GPOs in the domain, use:

Get-GPOReport -All -ReportType Html -Path "C:\Reports\AllGPOs.html"

Reading the Report

The HTML report opens in any browser and displays sections for Computer Configuration and User Configuration. Each section lists settings with their state (Enabled, Disabled, Not Configured) and values. The XML report is more compact and can be parsed programmatically.

Common Issues and Troubleshooting

  • Module not found: If Get-GPOReport is not recognized, install RSAT or enable the Group Policy Management feature via Add-WindowsCapability (Windows 10/11) or Install-WindowsFeature (Server).
  • Access denied: You need read access to the GPOs. Run PowerShell as administrator or use a domain account with appropriate permissions.
  • Empty report: If the report is blank, the GPO may have no settings, or the cmdlet might have failed silently. Check the path and permissions.
  • Large domains: Generating reports for thousands of GPOs can be slow. Use -Name to target specific GPOs or filter with Get-GPO first.

Alternatives to Get-GPOReport

If the GroupPolicy module is unavailable, you can use the GPMC COM object in PowerShell to export reports. For example:

$gpmc = New-Object -ComObject GPMC

This is more complex but works on machines without RSAT. Another option is to use the Export-GPO cmdlet, which creates a backup folder with XML files, but that is not a single report.

Frequently Asked Questions

Can I generate a report for a specific GPO by GUID?

Yes, use -Guid <GUID> instead of -Name. For example: Get-GPOReport -Guid "12345678-1234-1234-1234-123456789012" -ReportType Html -Path "report.html".

How do I export all GPOs as separate files?

Loop through each GPO with Get-GPO -All and call Get-GPOReport for each, using the GPO name in the filename. For example: Get-GPO -All | ForEach-Object { Get-GPOReport -Name $_.DisplayName -ReportType Html -Path "C:\Reports\$($_.DisplayName).html" }.

What is the difference between HTML and XML report types?

HTML is for human reading in a browser; XML is structured for parsing with scripts or tools. XML is also smaller and easier to diff between versions.

Why do I get "The term 'Get-GPOReport' is not recognized"?

This means the GroupPolicy module is not loaded. Run Import-Module GroupPolicy after installing RSAT, or install the module via Add-WindowsCapability -Online -Name "Rsat.GroupPolicy.Management.Tools~~~~0.0.1.0" on Windows 10/11.

Can I generate a report for a GPO in another domain?

Yes, use the -Domain parameter to specify the domain, and ensure your account has access. For example: Get-GPOReport -Name "Policy" -Domain "child.domain.com" -ReportType Html -Path "report.html".