Loading and accessing Group Policy Object settings XML reports in C#.NET and PowerShell

If you want to access the settings stored in a Group Policy object you can run the Get-GPOReport PowerShell cmdlet with the name and report type parameters.

Get-GPOReport -Name "Default Domain Policy" -ReportType Xml

(If you want to do this for a Starter GPO there's an extra step to follow detailed here).

You can also use the Group Policy Management Console.


The output however is somewhat complex and there (doesn't seem to be) an XSL file or data model that corresponds to the entire report file.

To resolve this we have provided a .NET API based on the .NET Framework 4.8.


CENTREL.ThirdParty.Microsoft.GroupPolicy.Model.dll

This FREE data model and test harness can be found here.
https://www.centrel-solutions.com/support/tools.aspx?feature=GroupPolicyReportApi

The API:

  • Loads the GPO report as strongly typed .NET objects.

  • Supports PowerShell.

  • Allows you to find extensions by type.


We are using this data model in our Server Documentation tool XIA Configuration Server.

https://www.centrel-solutions.com/xiaconfiguration/it-documentation-software.aspx

XIA Configuration Server adds the ability to

  • View the Group Policy object settings in a full user interface.

  • Compare the settings between two Group Policy Objects, or two versions of the same Group Policy Object.

  • Export the settings to PDF documentation.

  • Execute reports against multiple Group Policy Objects in multiple domains in the environment.


 While you're here -
Why not check out our Group Policy Audit and Documentation Tool?



Comments

Popular posts from this blog

Windows Server 2016, 2019, 2022, Windows 10 and Windows 11: Date and time "Some settings are managed by your organization".

TFTPD32 or TFTPD64 reports Bind error 10013 An attempt was made to access a socket in a way forbidden by its access permissions.

Windows Server 2019 desktop icons such as My Computer, Windows cannot access the specified device, path, or file.