Active Directory Management Framework

Configuration driven Active Directory management.

Register-DMGPOwner

SYNOPSIS

Define the desired state for group policy ownership.

SYNTAX

Explicit

Register-DMGPOwner -GpoName <String> -Identity <String> [-ContextName <String>]
 [-ProgressAction <ActionPreference>] [<CommonParameters>]

Filter

Register-DMGPOwner -Filter <String> [-Weight <Int32>] -Identity <String> [-ContextName <String>]
 [-ProgressAction <ActionPreference>] [<CommonParameters>]

All

Register-DMGPOwner [-All] -Identity <String> [-ContextName <String>] [-ProgressAction <ActionPreference>]
 [<CommonParameters>]

DESCRIPTION

Define the desired state for group policy ownership. Afterwards use Test-DMGPOwner to determine, whether reality matches desire. Or Invoke-DMGPOwner to bring reality into the desired state.

You can define ownership in three ways:

In Case multiple rules apply to a GPO, this precedence will be adhered to: Explicit > Filter > Global In case multiple filters apply, the one with the lowest Weight value applies.

EXAMPLES

EXAMPLE 1

Get-Content .\gpoowners.json | ConvertFrom-Json | Write-Output | Register-DMGPOwner

Reads all settings from the provided json file and registers them.

PARAMETERS

-GpoName

The name of the GPO this rule applies to. This parameter uses name resolution.

Type: String
Parameter Sets: Explicit
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Filter

The filter by which to determine which GPO this rule applies to. Examples:

Conditions are documented here:

Type: String
Parameter Sets: Filter
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Weight

The precedence order when multiple filter conditions apply. The lower the number, the higher the priority.

Type: Int32
Parameter Sets: Filter
Aliases:

Required: False
Position: Named
Default value: 50
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-All

Define a global default rule. There can always only be one global default value.

Type: SwitchParameter
Parameter Sets: All
Aliases:

Required: True
Position: Named
Default value: False
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Identity

The identity that should be the owner of the affected GPO(s). Can be a sid or an NT identity reference. This parameter supports name resolution.

Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ContextName

The name of the context defining the setting. This allows determining the configuration set that provided this setting. Used by the ADMF, available to any other configuration management solution.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: <Undefined>
Accept pipeline input: False
Accept wildcard characters: False

-ProgressAction

Type: ActionPreference
Parameter Sets: (All)
Aliases: proga

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

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.

INPUTS

OUTPUTS

NOTES

General notes