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

Repair-GPOZaurrPermission

Module
GPOZaurr

Repairs permissions for Group Policy Objects (GPOs) based on specified criteria.

Syntax

Repair-GPOZaurrPermission
[[-ExcludeDomains] <String[]>]
[[-ExtendedForestInformation] <IDictionary>]
[[-Forest] <String>]
[[-IncludeDomains] <String[]>]
[[-LimitProcessing] <Int32>]
[-Type] <AuthenticatedUsers|Unknown|System|Administrative|All>
[<CommonParameters>]
#
Parameter set: All Parameter Sets

Description

The Repair-GPOZaurrPermission function repairs permissions for GPOs based on the specified criteria. It analyzes the permissions of GPOs and adds necessary permissions if they are missing.

Examples

Example 1

Repair-GPOZaurrPermission -Type 'All' -Forest 'ContosoForest' -IncludeDomains @('Domain1', 'Domain2') -ExcludeDomains @('Domain3') -ExtendedForestInformation $info -LimitProcessing 100
Repairs permissions for all types of users in the 'ContosoForest' forest, including only 'Domain1' and 'Domain2' while excluding 'Domain3', with extended forest information and processing a maximum of 100 GPOs.

Parameters

-ExcludeDomains String[] optionalposition: 2
Specifies an array of domains to exclude from the analysis.
-ExtendedForestInformation IDictionary optionalposition: 4
Specifies additional information about the forest.
-Forest String optionalposition: 1aliases: ForestName
Specifies the forest name to analyze GPO permissions.
-IncludeDomains String[] optionalposition: 3aliases: Domain, Domains
Specifies an array of domains to include in the analysis.
-LimitProcessing Int32 optionalposition: 5
Specifies the maximum number of GPOs to process.
-Type String[] requiredposition: 0
Specifies the type of permissions to repair. Valid values are 'AuthenticatedUsers', 'Unknown', 'System', 'Administrative', and 'All'.
Possible values: AuthenticatedUsers, Unknown, System, Administrative, All

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.