# Get-GPOZaurrOrganizationalUnit

Retrieves information about Group Policy Objects (GPOs) linked to Organizational Units (OUs) within a specified forest.

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`

Retrieves information about Group Policy Objects (GPOs) linked to Organizational Units (OUs) within a specified forest.

## Syntax

```
Get-GPOZaurrOrganizationalUnit
[[-ExcludeDomains] <String[]>]
[[-ExcludeOrganizationalUnit] <String[]>]
[[-ExtendedForestInformation] <IDictionary>]
[[-Forest] <String>]
[[-IncludeDomains] <String[]>]
[[-Option] <OK|Unlink|Delete>]
[<CommonParameters>]
```

[#](#method-get-gpozaurrorganizationalunit-string-string-idictionary-string-string-string)

Parameter set: `All Parameter Sets`

## Description

This function retrieves detailed information about the GPOs linked to OUs within a specified forest. It provides information on linked GPOs, objects within OUs, and counts of objects at different levels.

## Examples

### Example 1

```powershell
Get-GPOZaurrOrganizationalUnit -Forest "contoso.com" -IncludeDomains "child.contoso.com" -ExcludeDomains "test.contoso.com" -ExtendedForestInformation $ExtendedInfo -Option "OK" -ExcludeOrganizationalUnit "OU=Test,DC=contoso,DC=com"
Retrieves information about GPOs linked to OUs in the "contoso.com" forest, including the "child.contoso.com" domain, excluding the "test.contoso.com" domain, with additional forest information, performing the 'OK' action, and excluding the "OU=Test,DC=contoso,DC=com" OU.
```

## Parameters

**-ExcludeDomains String[] optionalposition: 1**

Specifies an array of domains to exclude from processing.

**-ExcludeOrganizationalUnit String[] optionalposition: 5aliases: ExcludeOU, Exclusions**

Specifies an array of OUs to exclude from processing.

**-ExtendedForestInformation IDictionary optionalposition: 3**

Specifies additional information about the forest.

**-Forest String optionalposition: 0aliases: ForestName**

Specifies the name of the forest to retrieve information from.

**-IncludeDomains String[] optionalposition: 2aliases: Domain, Domains**

Specifies an array of domains to include for processing.

**-Option String[] optionalposition: 4**

Specifies the action to perform on the retrieved data. Valid values are 'OK', 'Unlink', or 'Delete'.

Possible values: `OK`, `Unlink`, `Delete`

## 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:D859546D92B6F30CD7C6C0F009AC8CB0189DF1F10C0FC6B5E25B47C16469979E -->
