# Remove-GPOZaurr

Removes Group Policy Objects based on specified criteria.

Project

GPOZaurr

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

[View on GitHub](https://github.com/EvotecIT/GPOZaurr) [Visit Website](#) [Releases](https://github.com/EvotecIT/GPOZaurr/releases/tag/v1.1.10) [Changelog](#) [Get package](https://www.powershellgallery.com/packages/GPOZaurr/1.1.9)

Stars **1,257**

Forks **121**

Open issues **15**

PowerShell Gallery downloads **421,558**

Release **v1.1.11**

Language: PowerShell Updated: 2026-10-30

Command 

**Module**

`GPOZaurr`

Removes Group Policy Objects based on specified criteria.

## Syntax

```
Remove-GPOZaurr
[-BackupDated]
[-BackupPath <String>]
[-ExcludeDomains <String[]>]
[[-ExcludeGroupPolicies] <ScriptBlock>]
[-ExtendedForestInformation <IDictionary>]
[-Forest <String>]
[-GPOPath <String[]>]
[-IncludeDomains <String[]>]
[-LimitProcessing <Int32>]
[-RequireDays <Int32>]
[-Type] <Empty|Unlinked|Disabled|NoApplyPermission>
[<CommonParameters>]
```

[#](#method-remove-gpozaurr-switchparameter-string-string-scriptblock-idictionary-string-string-string-int32-int32-string)

Parameter set: `All Parameter Sets`

## Description

The Remove-GPOZaurr function removes Group Policy Objects (GPOs) based on the specified criteria. It allows for filtering by various parameters such as GPO type, forest, domains, and more.

## Examples

### Example 1

```powershell
Remove-GPOZaurr -Type 'Empty' -Forest 'Contoso' -IncludeDomains 'Domain1', 'Domain2' -BackupPath 'C:\GPOBackups' -BackupDated -RequireDays 7
Removes all empty GPOs from the 'Contoso' forest for 'Domain1' and 'Domain2', backs them up to 'C:\GPOBackups' with dated folders, and requires removal after 7 days.
```

### Example 2

```powershell
Remove-GPOZaurr -Type 'Disabled' -Forest 'Fabrikam' -ExcludeDomains 'Domain3' -LimitProcessing 10
Removes all disabled GPOs from the 'Fabrikam' forest excluding 'Domain3' and processes only the first 10 GPOs.
```

## Parameters

**-BackupDated SwitchParameter optional**

Indicates whether the backup should be dated.

**-BackupPath String optional**

Specifies the path for backing up GPOs before removal.

**-ExcludeDomains String[] optional**

Specifies the domains to exclude from GPO removal.

**-ExcludeGroupPolicies ScriptBlock optionalposition: 1**

Specifies the Group Policies to exclude from removal.

**-ExtendedForestInformation IDictionary optional**

Specifies additional information about the forest.

**-Forest String optionalaliases: ForestName**

Specifies the forest to target for GPO removal.

**-GPOPath String[] optional**

Specifies the path to the GPOs to be removed.

**-IncludeDomains String[] optionalaliases: Domain, Domains**

Specifies the domains to include for GPO removal.

**-LimitProcessing Int32 optional**

Specifies the maximum number of GPOs to process before stopping.

**-RequireDays Int32 optional**

Specifies the number of days before GPO removal is required.

**-Type String[] requiredposition: 0**

Specifies the type of GPOs to target for removal. Valid values are 'Empty', 'Unlinked', 'Disabled', 'NoApplyPermission'.

Possible values: `Empty`, `Unlinked`, `Disabled`, `NoApplyPermission`

## 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](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_commonparameters).

Evotec API Reference Copyright 2026 Evotec Services

<!-- PowerForge markdown artifact sha256:8E6E9A401F55413BD7BCF31842EF351E60ABDB8B2A80962B4B04D8C03E9288E7 -->
