Project

GPOZaurr

GPOZaurr helps inspect, report on, and remediate Group Policy environments with PowerShell.

Stars 1,256
Forks 120
Open issues 15
PowerShell Gallery downloads 421,558
Release v1.1.11
Language: PowerShell Updated: 2026-10-30
Command

Optimize-GPOZaurr

Module
GPOZaurr

Enables or disables user/computer section of group policy based on it's content.

Syntax

Optimize-GPOZaurr
[-ExcludeDomains <String[]>]
[[-ExcludeGroupPolicies] <ScriptBlock>]
[-ExtendedForestInformation <IDictionary>]
[-Forest <String>]
-GPOName <String>
[-IncludeDomains <String[]>]
[-LimitProcessing <Int32>]
[<CommonParameters>]
#
Parameter set: GPOName
Optimize-GPOZaurr
[-ExcludeDomains <String[]>]
[[-ExcludeGroupPolicies] <ScriptBlock>]
[-ExtendedForestInformation <IDictionary>]
[-Forest <String>]
-GPOGuid <String>
[-IncludeDomains <String[]>]
[-LimitProcessing <Int32>]
[<CommonParameters>]
#
Parameter set: GPOGUID
Optimize-GPOZaurr
-All
[-ExcludeDomains <String[]>]
[[-ExcludeGroupPolicies] <ScriptBlock>]
[-ExtendedForestInformation <IDictionary>]
[-Forest <String>]
[-IncludeDomains <String[]>]
[-LimitProcessing <Int32>]
[<CommonParameters>]
#
Parameter set: All

Examples

Example 1

Optimize-GPOZaurr -All -WhatIf -Verbose -LimitProcessing 2

Example 2

Optimize-GPOZaurr -All -WhatIf -Verbose -LimitProcessing 2 {
    Skip-GroupPolicy -Name 'TEST | Drive Mapping 1'
    Skip-GroupPolicy -Name 'TEST | Drive Mapping 2'
}

Parameters

-ExcludeDomains String[] optional
Exclude domain from search, by default whole forest is scanned
-ExcludeGroupPolicies ScriptBlock optionalposition: 1
Provide a list of group policies to skip using Skip-GroupPolicy cmdlet
-ExtendedForestInformation IDictionary optional
Ability to provide Forest Information from another command to speed up processing
-Forest String optionalaliases: ForestName
Target different Forest, by default current forest is used
-GPOName String requiredaliases: DisplayName, Namesets: GPOName
Specifies a value for gpo name.
-IncludeDomains String[] optionalaliases: Domain, Domains
Include only specific domains, by default whole forest is scanned
-LimitProcessing Int32 optional
Allows to specify maximum number of items that will be fixed in a single run. It doesn't affect amount of GPOs processed
-GPOGuid String requiredaliases: GPOID, GUIDsets: GPOGUID
Specifies a value for gpo guid.
-All SwitchParameter requiredsets: All
Specifies the all switch.

Common Parameters

This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.

For more information, see about_CommonParameters.