API Reference
Function
Set-GPOZaurrOwner
Sets GPO Owner to Domain Admins or other choosen account
Remarks
Sets GPO Owner to Domain Admins or other choosen account. GPO Owner is set in AD and SYSVOL unless specified otherwise. If account doesn't require change, no change is done.
Examples
EXAMPLE 1
PS >
Set-GPOZaurrOwner -Type All -Verbose -WhatIf -LimitProcessing 2
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
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:
TypeParameters
- Action String
- Possible values:
OnlyAD,OnlyFileSystem - ApprovedOwner String[]
- ExcludeDomains String[]
- Exclude domain from search, by default whole forest is scanned
- ExtendedForestInformation IDictionary
- Ability to provide Forest Information from another command to speed up processing
- Force SwitchParameter
- Pushes new owner regardless if it's already set or not
- Forest String
- Target different Forest, by default current forest is used
- IncludeDomains String[]
- Include only specific domains, by default whole forest is scanned
- LimitProcessing Int32
- 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
- Parameter description
- SkipSysvol SwitchParameter
- Set GPO Owner only in Active Directory. By default GPO Owner is being set in both places
- Type String
- 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
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:
NamedParameters
- Action String
- Possible values:
OnlyAD,OnlyFileSystem - ApprovedOwner String[]
- ExcludeDomains String[]
- Exclude domain from search, by default whole forest is scanned
- ExtendedForestInformation IDictionary
- Ability to provide Forest Information from another command to speed up processing
- Force SwitchParameter
- Pushes new owner regardless if it's already set or not
- Forest String
- Target different Forest, by default current forest is used
- GPOGuid String
- GUID of GPO. By default all GPOs are targetted
- GPOName String
- Name of GPO. By default all GPOs are targetted
- IncludeDomains String[]
- Include only specific domains, by default whole forest is scanned
- LimitProcessing Int32
- 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
- Parameter description
- SkipSysvol SwitchParameter
- Set GPO Owner only in Active Directory. By default GPO Owner is being set in both places