Evotec

Project

GPOZaurr

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

Stars 1,166
Forks 115
Open issues 16
PowerShell Gallery downloads 417,764
Release v1.1.9
Language: PowerShell Updated: 2026-04-11

API Reference

Function

Remove-GPOZaurrDuplicateObject

Namespace GPOZaurr

Removes duplicate Group Policy Objects (GPOs) identified by the Get-GPOZaurrDuplicateObject function.

Remarks

This function removes duplicate GPOs based on the criteria provided. It retrieves duplicate GPO objects using Get-GPOZaurrDuplicateObject and then attempts to remove them from the Active Directory.

Examples

Authored help example

EXAMPLE 1

PS >


Remove-GPOZaurrDuplicateObject -Forest "contoso.com" -IncludeDomains "domain1.com", "domain2.com" -ExcludeDomains "domain3.com" -LimitProcessing 5
        

Description: Removes duplicate GPOs from the forest "contoso.com" for domains "domain1.com" and "domain2.com", excluding "domain3.com", processing only the first 5 duplicates.

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.

Syntax

Remove-GPOZaurrDuplicateObject [-ExcludeDomains <String[]>] [-ExtendedForestInformation <IDictionary>] [-Forest <String>] [-IncludeDomains <String[]>] [-LimitProcessing <Int32>] [<CommonParameters>]
#
Parameter set: All Parameter Sets

Parameters

ExcludeDomains String[] optionalposition: 2pipeline: False
Specifies an array of domains to exclude from the duplicate GPO removal process.
ExtendedForestInformation IDictionary optionalposition: 4pipeline: False
Specifies additional information about the forest.
Forest String optionalposition: 1pipeline: Falsealiases: ForestName
Specifies the forest where the duplicate GPOs are located.
IncludeDomains String[] optionalposition: 3pipeline: Falsealiases: Domain, Domains
Specifies an array of domains to include in the duplicate GPO removal process.
LimitProcessing Int32 optionalposition: 0pipeline: False
Specifies the maximum number of duplicate GPOs to process. Default is set to [int32]::MaxValue.