PowerShell Genie

Generate a GPO report

Script 2 min read Windows PowerShell 5.1 and PowerShell 7

Documentation: Microsoft Learn

Create an HTML report of domain Group Policy settings with Get-GPOReport -All, including configured settings rather than only GPO names.

The script

1PS> Get-GPOReport -All -ReportType Html -Path .\GPOReport.html

Script reader

Inspect before you run

Inspection only

Inspect the script below. It does not run in this browser.

Inspection only — no command has run.

    Show reference output
    1 DisplayName Id GpoStatus
    2 ----------- -- ---------
    3 Default Domain Policy 31b2f340-016d-11d2-945f-00c04fb984f9 AllSettingsEnabled
    Inspect this example’s structure

    Read the command and its supplied arguments. This example requires real PowerShell or its module; this diagram does not execute it.

    Get-GPOReport -All -ReportType Html -Path .\GPOReport.html
    1. Stage 1Get-GPOReport-All -ReportType -Path

      How it works

      Get-GPOReport with -All and -ReportType Html renders every policy in the domain into one HTML document at the given path, and it includes the configured settings themselves rather than only the object metadata. Searching that single file in a browser replaces the whole click-through.

      Adapting it

      Choose -ReportType Xml when the report needs parsing rather than reading, which lets Select-Xml and an XPath expression answer questions across all policies at once.

      Requirements

      GroupPolicy module and read access to every GPO being reported.

      If the result is unexpected

      A GPO report cannot be written or contains the wrong policy.

      The report path, domain or policy identifier may differ from the intended target.

      1. Resolve the GPO GUID and verify that the output directory exists and is writable.

      Validate the result

      Open the generated report and confirm its policy GUID, domain and generation time.

      Keep the check reliable

      Use an explicit output path and include the policy GUID in the filename or audit record.

      Primary documentation

      Files, storage and hashes documentation

      Continue
      Genie guideGenerate a GPO report

      Create an HTML report of domain Group Policy settings with Get-GPOReport -All, including configured settings rather than only GPO names.