Project

GPOZaurr

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

Stars 1,250
Forks 119
Open issues 15
PowerShell Gallery downloads 421,558
Release v1.1.11
Language: PowerShell Updated: 2026-10-09
Command

Clear-GPOZaurrSysvolDFSR

Module GPOZaurr

Clears the ConflictAndDeleted folder in DFSR for specified GPOs.

Syntax

Clear-GPOZaurrSysvolDFSR [[-ExcludeDomainControllers] <String[]>] [[-ExcludeDomains] <String[]>] [[-ExtendedForestInformation] <IDictionary>] [[-Forest] <String>] [[-IncludeDomainControllers] <String[]>] [[-IncludeDomains] <String[]>] [[-LimitProcessing] <Int32>] [-SkipRODC] [<CommonParameters>]
#
Parameter set: All Parameter Sets

Description

This function clears the ConflictAndDeleted folder in DFSR for specified Group Policy Objects (GPOs) within a given forest. It allows excluding specific domains and domain controllers if needed.

Examples

Authored help example

EXAMPLE 1

Clear-GPOZaurrSysvolDFSR -Forest "contoso.com" -IncludeDomains "child.contoso.com" -ExcludeDomainControllers "dc1.contoso.com" -SkipRODC
Clears the ConflictAndDeleted folder in DFSR for GPOs in the "contoso.com" forest, including only the "child.contoso.com" domain and excluding the "dc1.contoso.com" domain controller.

EXAMPLE 2

Clear-GPOZaurrSysvolDFSR -Forest "contoso.com" -IncludeDomains "child.contoso.com" -LimitProcessing 5
Clears the ConflictAndDeleted folder in DFSR for GPOs in the "contoso.com" forest, including only the "child.contoso.com" domain, and processes a maximum of 5 GPOs.

Parameters

-ExcludeDomainControllers String[] optionalposition: 2
Specifies an array of domain controllers to exclude from the cleanup process.
-ExcludeDomains String[] optionalposition: 1
Specifies an array of domains to exclude from the cleanup process.
-ExtendedForestInformation IDictionary optionalposition: 5
Specifies additional forest information if needed.
-Forest String optionalposition: 0aliases: ForestName
Specifies the forest name where the GPOs are located.
-IncludeDomainControllers String[] optionalposition: 4aliases: DomainControllers
Specifies an array of domain controllers to include in the cleanup process.
-IncludeDomains String[] optionalposition: 3aliases: Domain, Domains
Specifies an array of domains to include in the cleanup process.
-LimitProcessing Int32 optionalposition: 6
Specifies the maximum number of GPOs to process.
-SkipRODC SwitchParameter optional
Indicates whether Read-Only Domain Controllers (RODCs) should be skipped during cleanup.

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.