Files
GPOZaurr/Docs/Set-GPOZaurrOwner.md
T
Przemysław Kłys f7bdaca724 docs: ✏️ Update documentation for GPOZaurr module
- Revised `Set-GPOZaurrOwner.md` to enhance clarity and detail for parameters and examples.
- Updated `Set-GPOZaurrStatus.md` with a new online version link and improved structure.
- Refined `Skip-GroupPolicy.md` to clarify usage within script blocks and added examples.
- Adjusted `GPOZaurr.psd1` for version updates and improved module dependencies.
- Enhanced `GPOZaurr.psm1` for better error handling during function imports.
- Modified `Invoke-GPOZaurrSupport.ps1` examples to use `Join-Path` for path construction.
2026-05-19 18:47:50 +02:00

262 lines
6.0 KiB
Markdown

---
external help file: GPOZaurr-help.xml
Module Name: GPOZaurr
online version: https://github.com/EvotecIT/GPOZaurr
schema: 2.0.0
---
# Set-GPOZaurrOwner
## SYNOPSIS
Sets GPO Owner to Domain Admins or other choosen account
## SYNTAX
### Type (Default)
```powershell
Set-GPOZaurrOwner -Type <string> [-Forest <string>] [-ExcludeDomains <string[]>] [-IncludeDomains <string[]>] [-ExtendedForestInformation <IDictionary>] [-Principal <string>] [-SkipSysvol] [-LimitProcessing <int>] [-ApprovedOwner <string[]>] [-Action <string>] [-Force] [-WhatIf] [-Confirm] [<CommonParameters>]
```
### Named
```powershell
Set-GPOZaurrOwner [-GPOName <string>] [-GPOGuid <string>] [-Forest <string>] [-ExcludeDomains <string[]>] [-IncludeDomains <string[]>] [-ExtendedForestInformation <IDictionary>] [-Principal <string>] [-SkipSysvol] [-LimitProcessing <int>] [-ApprovedOwner <string[]>] [-Action <string>] [-Force] [-WhatIf] [-Confirm] [<CommonParameters>]
```
## DESCRIPTION
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
```powershell
PS > Set-GPOZaurrOwner -Type All -Verbose -WhatIf -LimitProcessing 2
```
## PARAMETERS
### -Action
{{ Fill Action Description }}
```yaml
Type: String
Parameter Sets: Type, Named
Aliases:
Possible values: OnlyAD, OnlyFileSystem
Required: False
Position: named
Default value: None
Accept pipeline input: False
Accept wildcard characters: True
```
### -ApprovedOwner
{{ Fill ApprovedOwner Description }}
```yaml
Type: String[]
Parameter Sets: Type, Named
Aliases: Exclusion, Exclusions
Possible values:
Required: False
Position: named
Default value: None
Accept pipeline input: False
Accept wildcard characters: True
```
### -ExcludeDomains
Exclude domain from search, by default whole forest is scanned
```yaml
Type: String[]
Parameter Sets: Type, Named
Aliases:
Possible values:
Required: False
Position: named
Default value: None
Accept pipeline input: False
Accept wildcard characters: True
```
### -ExtendedForestInformation
Ability to provide Forest Information from another command to speed up processing
```yaml
Type: IDictionary
Parameter Sets: Type, Named
Aliases:
Possible values:
Required: False
Position: named
Default value: None
Accept pipeline input: False
Accept wildcard characters: True
```
### -Force
Pushes new owner regardless if it's already set or not
```yaml
Type: SwitchParameter
Parameter Sets: Type, Named
Aliases:
Possible values:
Required: False
Position: named
Default value: False
Accept pipeline input: False
Accept wildcard characters: True
```
### -Forest
Target different Forest, by default current forest is used
```yaml
Type: String
Parameter Sets: Type, Named
Aliases: ForestName
Possible values:
Required: False
Position: named
Default value: None
Accept pipeline input: False
Accept wildcard characters: True
```
### -GPOGuid
GUID of GPO. By default all GPOs are targetted
```yaml
Type: String
Parameter Sets: Named
Aliases: GUID, GPOID
Possible values:
Required: False
Position: named
Default value: None
Accept pipeline input: False
Accept wildcard characters: True
```
### -GPOName
Name of GPO. By default all GPOs are targetted
```yaml
Type: String
Parameter Sets: Named
Aliases:
Possible values:
Required: False
Position: named
Default value: None
Accept pipeline input: False
Accept wildcard characters: True
```
### -IncludeDomains
Include only specific domains, by default whole forest is scanned
```yaml
Type: String[]
Parameter Sets: Type, Named
Aliases: Domain, Domains
Possible values:
Required: False
Position: named
Default value: None
Accept pipeline input: False
Accept wildcard characters: True
```
### -LimitProcessing
Allows to specify maximum number of items that will be fixed in a single run. It doesn't affect amount of GPOs processed
```yaml
Type: Int32
Parameter Sets: Type, Named
Aliases:
Possible values:
Required: False
Position: named
Default value: 2147483647
Accept pipeline input: False
Accept wildcard characters: True
```
### -Principal
Parameter description
```yaml
Type: String
Parameter Sets: Type, Named
Aliases:
Possible values:
Required: False
Position: named
Default value: None
Accept pipeline input: False
Accept wildcard characters: True
```
### -SkipSysvol
Set GPO Owner only in Active Directory. By default GPO Owner is being set in both places
```yaml
Type: SwitchParameter
Parameter Sets: Type, Named
Aliases:
Possible values:
Required: False
Position: named
Default value: False
Accept pipeline input: False
Accept wildcard characters: True
```
### -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
```yaml
Type: String
Parameter Sets: Type
Aliases:
Possible values: Unknown, NotAdministrative, NotMatching, Inconsistent, All
Required: True
Position: named
Default value: None
Accept pipeline input: False
Accept wildcard characters: True
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
- `None`
## OUTPUTS
- `None`
## RELATED LINKS
- None