# Optimize-GPOZaurr

Enables or disables user/computer section of group policy based on it's content.

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`

Enables or disables user/computer section of group policy based on it's content.

## Syntax

```
Optimize-GPOZaurr
[-ExcludeDomains <String[]>]
[[-ExcludeGroupPolicies] <ScriptBlock>]
[-ExtendedForestInformation <IDictionary>]
[-Forest <String>]
-GPOName <String>
[-IncludeDomains <String[]>]
[-LimitProcessing <Int32>]
[<CommonParameters>]
```

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

Parameter set: `GPOName`

```
Optimize-GPOZaurr
[-ExcludeDomains <String[]>]
[[-ExcludeGroupPolicies] <ScriptBlock>]
[-ExtendedForestInformation <IDictionary>]
[-Forest <String>]
-GPOGuid <String>
[-IncludeDomains <String[]>]
[-LimitProcessing <Int32>]
[<CommonParameters>]
```

[#](#method-optimize-gpozaurr-string-scriptblock-idictionary-string-string-string-int32-2)

Parameter set: `GPOGUID`

```
Optimize-GPOZaurr
-All
[-ExcludeDomains <String[]>]
[[-ExcludeGroupPolicies] <ScriptBlock>]
[-ExtendedForestInformation <IDictionary>]
[-Forest <String>]
[-IncludeDomains <String[]>]
[-LimitProcessing <Int32>]
[<CommonParameters>]
```

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

Parameter set: `All`

## Examples

### Example 1

```powershell
Optimize-GPOZaurr -All -WhatIf -Verbose -LimitProcessing 2
```

### Example 2

```powershell
Optimize-GPOZaurr -All -WhatIf -Verbose -LimitProcessing 2 {
    Skip-GroupPolicy -Name 'TEST | Drive Mapping 1'
    Skip-GroupPolicy -Name 'TEST | Drive Mapping 2'
}
```

## Parameters

**-ExcludeDomains String[] optional**

Exclude domain from search, by default whole forest is scanned

**-ExcludeGroupPolicies ScriptBlock optionalposition: 1**

Provide a list of group policies to skip using Skip-GroupPolicy cmdlet

**-ExtendedForestInformation IDictionary optional**

Ability to provide Forest Information from another command to speed up processing

**-Forest String optionalaliases: ForestName**

Target different Forest, by default current forest is used

**-GPOName String requiredaliases: DisplayName, Namesets: GPOName**

Specifies a value for gpo name.

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

Include only specific domains, by default whole forest is scanned

**-LimitProcessing Int32 optional**

Allows to specify maximum number of items that will be fixed in a single run. It doesn't affect amount of GPOs processed

**-GPOGuid String requiredaliases: GPOID, GUIDsets: GPOGUID**

Specifies a value for gpo guid.

**-All SwitchParameter requiredsets: All**

Specifies the all switch.

## 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:1D4CFDE13F1EE4056E37CF19EDD3E26E2FE1FFA8EFA3031425ABBB54D3514DE9 -->
