Project

GPOZaurr

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

Stars 1,256
Forks 120
Open issues 15
PowerShell Gallery downloads 421,558
Release v1.1.11
Language: PowerShell Updated: 2026-10-30
Command

Set-GPOZaurrOwner

Module
GPOZaurr

Sets GPO Owner to Domain Admins or other choosen account

Syntax

Set-GPOZaurrOwner
[-Action <OnlyAD|OnlyFileSystem>]
[-ApprovedOwner <String[]>]
[-ExcludeDomains <String[]>]
[-ExtendedForestInformation <IDictionary>]
[-Force]
[-Forest <String>]
[-IncludeDomains <String[]>]
[-LimitProcessing <Int32>]
[-Principal <String>]
[-SkipSysvol]
-Type <Unknown|NotAdministrative|NotMatching|Inconsistent|All>
[<CommonParameters>]
#
Parameter set: Type
Set-GPOZaurrOwner
[-Action <OnlyAD|OnlyFileSystem>]
[-ApprovedOwner <String[]>]
[-ExcludeDomains <String[]>]
[-ExtendedForestInformation <IDictionary>]
[-Force]
[-Forest <String>]
[-GPOGuid <String>]
[-GPOName <String>]
[-IncludeDomains <String[]>]
[-LimitProcessing <Int32>]
[-Principal <String>]
[-SkipSysvol]
[<CommonParameters>]
#
Parameter set: Named

Description

. GPO Owner is set in AD and SYSVOL unless specified otherwise. If account doesn't require change, no change is done.

Examples

Example 1

Set-GPOZaurrOwner -Type All -Verbose -WhatIf -LimitProcessing 2

Parameters

-Action String optional
Specifies a value for action.
Possible values: OnlyAD, OnlyFileSystem
-ApprovedOwner String[] optionalaliases: Exclusion, Exclusions
Specifies one or more values for approved owner.
-ExcludeDomains String[] optional
Exclude domain from search, by default whole forest is scanned
-ExtendedForestInformation IDictionary optional
Ability to provide Forest Information from another command to speed up processing
-Force SwitchParameter optional
Pushes new owner regardless if it's already set or not
-Forest String optionalaliases: ForestName
Target different Forest, by default current forest is used
-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
-Principal String optional
Parameter description
-SkipSysvol SwitchParameter optional
Set GPO Owner only in Active Directory. By default GPO Owner is being set in both places
-Type String requiredsets: Type
Unknown - finds unknown Owners and sets them to Administrative (Domain Admins) or chosen principal NotMatching - find administrative groups only and if sysvol and gpo doesn't match - replace with chosen principal or Domain Admins if not specified Inconsistent - same as not NotMatching NotAdministrative - combination of Unknown/NotMatching and NotAdministrative - replace with chosen principal or Domain Admins if not specified All - if Owner is known it checks if it's Administrative, if it sn't it fixes that. If owner is unknown it fixes it
Possible values: Unknown, NotAdministrative, NotMatching, Inconsistent, All
-GPOGuid String optionalaliases: GPOID, GUIDsets: Named
GUID of GPO. By default all GPOs are targetted
-GPOName String optionalsets: Named
Name of GPO. By default all GPOs are targetted

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.