GroupPolicy module: setup and commands
Documentation: Microsoft Learn
Find Group Policy objects with Get-GPO and export evidence with Get-GPOReport before changing links, inheritance or enforcement.
Getting it
Arrives with RSAT. Use Install-WindowsFeature GPMC on Windows Server, or Add-WindowsCapability -Online -Name Rsat.GroupPolicy.Management.Tools on a client.
Examples
Show reference output
Show reference output
What it is for
Reach for it to inventory GPOs, spot unlinked or empty policies, and generate an HTML or XML record for change control. Get-GPResultantSetOfPolicy answers the harder question of what actually applied to a given user and computer pair.
Typical tasks
- List every GPO with creation and modification times
- Find GPOs that have no links
- Produce an HTML report for an audit trail
- Read resultant set of policy for a target
- Back up and restore policy objects
- Compare one GPO across two domains
Check the installed version
Compare the module path and version with the session used by your scheduled task or automation account. Reach for it to inventory GPOs, spot unlinked or empty policies, and generate an HTML or XML record for change control. Get-GPResultantSetOfPolicy answers the harder question of what actually applied to a given user and computer pair.