Test-GroupPolicy

1.7.1

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 or Microsoft Edge IE Mode.

Tweaks:
- IE is instructed to render the report in IE5 Quirks Mode.
- A mark-of-the-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 Microsoft Edge.  Edge 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

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.7.1 - Updated documentation.
1.7.0 - Changed script to prompt to open in Microsoft Edge.  Updated mark-of-the-web entry to specify local intranet, allowing VBScript to work in IE Mode without forcing users to edit Group Policy.  Edited page header to include the words "(Requires IE Mode)" when the page needs to be opened in IE Mode.  Removed the incorrect warning that Get-GPResultantSetOfPolicy-generated reports require IE.
1.6.7 - Added Quiet switch to disable prompt to open report in IE.
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 (current version) 177 6/13/2022
1.6.7 18 6/6/2022
1.6.6 26 4/13/2022