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-GPOZaurrBroken

Aliases: Remove-GPOZaurrOrphaned
Namespace GPOZaurr
Aliases
Remove-GPOZaurrOrphaned

Finds and removes broken Group Policies from SYSVOL or AD or both.

Remarks

Finds and removes broken Group Policies from SYSVOL or AD or both. Assesment is based on Get-GPOZaurrBroken and there are 3 supported types: - AD - meaning GPOs which have no SYSVOL content will be deleted from AD - SYSVOL - meaning GPOs which have no AD content will be deleted from SYSVOL - ObjectClass - meaning GPOs which have ObjectClass category of Container rather than groupPolicyContainer will be deleted from AD & SYSVOL

Examples

Authored help example

EXAMPLE 1

PS >


Remove-GPOZaurrBroken -Verbose -WhatIf -Type AD, SYSVOL
        

EXAMPLE 2

PS >


Remove-GPOZaurrBroken -Verbose -WhatIf -Type AD, SYSVOL -IncludeDomains 'ad.evotec.pl' -LimitProcessing 2
        

EXAMPLE 3

PS >


Remove-GPOZaurrBroken -Verbose -IncludeDomains 'ad.evotec.xyz' -BackupPath $Env:UserProfile\Desktop\MyBackup1 -WhatIf -Type AD, SYSVOL
        

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-GPOZaurrBroken [-BackupDated] [-BackupPath <String>] [-ExcludeDomains <String[]>] [-ExtendedForestInformation <IDictionary>] [-Forest <String>] [-IncludeDomains <String[]>] [-LimitProcessing <Int32>] -Type <SYSVOL|AD|ObjectClass> [<CommonParameters>]
#
Parameter set: All Parameter Sets

Parameters

BackupDated SwitchParameter optionalposition: namedpipeline: False
Forces backup to be created within folder that has date in it
BackupPath String optionalposition: namedpipeline: False
Path to optional backup of SYSVOL content before deletion
ExcludeDomains String[] optionalposition: namedpipeline: False
Exclude domain from search, by default whole forest is scanned
ExtendedForestInformation IDictionary optionalposition: namedpipeline: False
Ability to provide Forest Information from another command to speed up processing
Forest String optionalposition: namedpipeline: Falsealiases: ForestName
Target different Forest, by default current forest is used
IncludeDomains String[] optionalposition: namedpipeline: Falsealiases: Domain, Domains
Include only specific domains, by default whole forest is scanned
LimitProcessing Int32 optionalposition: namedpipeline: False
Allows to specify maximum number of items that will be fixed in a single run. It doesn't affect amount of GPOs processed
Type String[] requiredposition: 0pipeline: Falsevalues: 3
Choose one or more types to delete. Options are AD, ObjectClass, SYSVOL
Possible values: SYSVOL, AD, ObjectClass