Remove-GPOZaurrDuplicateObject
Removes duplicate Group Policy Objects (GPOs) identified by the Get-GPOZaurrDuplicateObject function.
Syntax
Remove-GPOZaurrDuplicateObject [[-ExcludeDomains] <String[]>] [[-ExtendedForestInformation] <IDictionary>] [[-Forest] <String>] [[-IncludeDomains] <String[]>] [[-LimitProcessing] <Int32>] [<CommonParameters>]#All Parameter SetsDescription
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
EXAMPLE 1
Remove-GPOZaurrDuplicateObject -Forest "contoso.com" -IncludeDomains "domain1.com", "domain2.com" -ExcludeDomains "domain3.com" -LimitProcessing 5Description: Removes duplicate GPOs from the forest "contoso.com" for domains "domain1.com" and "domain2.com", excluding "domain3.com", processing only the first 5 duplicates.
Parameters
- -ExcludeDomains String[]
- Specifies an array of domains to exclude from the duplicate GPO removal process.
- -ExtendedForestInformation IDictionary
- Specifies additional information about the forest.
- -Forest String
- Specifies the forest where the duplicate GPOs are located.
- -IncludeDomains String[]
- Specifies an array of domains to include in the duplicate GPO removal process.
- -LimitProcessing Int32
- Specifies the maximum number of duplicate GPOs to process. Default is set to [int32]::MaxValue.
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.