Test-GroupPolicy

1.6.6

This script generates Resultant Set of Policy (RSoP) reports across Windows OSs with and without native PowerShell support for such.  When the native Get-GPResultantSetOfPolicy is available, that is used to generate an HTML/XML report.  When it is not, or the user wishes to output the results to console, the script relies on the older gpresult.exe.  To further improve
This script generates Resultant Set of Policy (RSoP) reports across Windows OSs with and without native PowerShell support for such.  When the native Get-GPResultantSetOfPolicy is available, that is used to generate an HTML/XML report.  When it is not, or the user wishes to output the results to console, the script relies on the older gpresult.exe.  To further improve usability, the headers of gpresult-generated HTML reports are tweaked (see bullets below for specifics).  These modifications help ensure the report is properly rendered in modern IE.

Tweaks:
- IE is instructed to render the report in IE5 Quirks Mode.
- A mark-of-web meta tag is added to eliminate the need to unblock the VBScript responsible for Expand/Collapse, Tooltips, Printing, LTR/RTL adjustments, and keypress support.

To save time, the user is also prompted about whether or not they want to open newly generated HTML reports in IE.  As of version 1.6.1-alpha, IE instances launched this way run with restricted permissions regardless of the elevation of the PowerShell Console.
Show more

Installation Options

Copy and Paste the following command to install this package using PowerShellGet More Info

Install-Script -Name Test-GroupPolicy -RequiredVersion 1.6.6

Copy and Paste the following command to install this package using Microsoft.PowerShell.PSResourceGet More Info

You can deploy this package directly to Azure Automation. Note that deploying packages with dependencies will deploy all the dependencies to Azure Automation. Learn More

Manually download the .nupkg file to your system's default download location. Note that the file won't be unpacked, and won't include any dependencies. Learn More

Owners

Copyright

2018-2022 Industrial Info Resources, Inc.

Package Details

Author(s)

  • William P. Marshall

Tags

GroupPolicy GPO RSoP ActiveDirectory Reporting HTML XML Windows

Dependencies

This script has no dependencies.

Release Notes

1.6.6 - Code Signing now includes a Timestamp for longevity.
1.6.5 - Migrated from Invoke-Expression to Invoke-Command and from Write-Host to Write-Output.  This resolves all warnings flagged by PSScriptAnalyzer.
1.6.4 - Script is now signed.
1.6.3 - Removed the "using:" prefix from variables passed to Get-GPResultantSetOfPolicy as parameter values.  Additionally removed the Requires clauses for built-in PowerShell Modules.  Both of these were causing issues when tested on Windows Server 2012 R2 and removing them resolved the problems.
1.6.1 - The script now uses the "runas" command to launch IE instances with restricted permissions instead of elevated permissions.  See https://stackoverflow.com/a/20218503 for details.

FileList

Version History

Version Downloads Last updated
1.7.1 148 6/13/2022
1.6.7 15 6/6/2022
1.6.6 (current version) 25 4/13/2022