Files
GPOZaurr/Docs/Remove-GPOZaurrDuplicateObject.md
T
Przemysław Kłys ecef7a7f16 update docs
2026-05-22 15:50:38 +02:00

3.1 KiB

external help file, Module Name, online version, schema
external help file Module Name online version schema
GPOZaurr-help.xml GPOZaurr https://github.com/EvotecIT/GPOZaurr 2.0.0

Remove-GPOZaurrDuplicateObject

SYNOPSIS

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

SYNTAX

__AllParameterSets

Remove-GPOZaurrDuplicateObject [[-LimitProcessing] <int>] [[-Forest] <string>] [[-ExcludeDomains] <string[]>] [[-IncludeDomains] <string[]>] [[-ExtendedForestInformation] <IDictionary>] [-WhatIf] [-Confirm] [<CommonParameters>]

DESCRIPTION

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

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.

PARAMETERS

-ExcludeDomains

Specifies an array of domains to exclude from the duplicate GPO removal process.

Type: String[]
Parameter Sets: __AllParameterSets
Aliases:
Possible values:

Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: True

-ExtendedForestInformation

Specifies additional information about the forest.

Type: IDictionary
Parameter Sets: __AllParameterSets
Aliases:
Possible values:

Required: False
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: True

-Forest

Specifies the forest where the duplicate GPOs are located.

Type: String
Parameter Sets: __AllParameterSets
Aliases: ForestName
Possible values:

Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: True

-IncludeDomains

Specifies an array of domains to include in the duplicate GPO removal process.

Type: String[]
Parameter Sets: __AllParameterSets
Aliases: Domain, Domains
Possible values:

Required: False
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: True

-LimitProcessing

Specifies the maximum number of duplicate GPOs to process. Default is set to [int32]::MaxValue.

Type: Int32
Parameter Sets: __AllParameterSets
Aliases:
Possible values:

Required: False
Position: 0
Default value: 2147483647
Accept pipeline input: False
Accept wildcard characters: True

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

  • None

OUTPUTS

  • None
  • None