Configuration driven Active Directory management.
Define the desired state for group policy ownership.
Register-DMGPOwner -GpoName <String> -Identity <String> [-ContextName <String>]
[-ProgressAction <ActionPreference>] [<CommonParameters>]
Register-DMGPOwner -Filter <String> [-Weight <Int32>] -Identity <String> [-ContextName <String>]
[-ProgressAction <ActionPreference>] [<CommonParameters>]
Register-DMGPOwner [-All] -Identity <String> [-ContextName <String>] [-ProgressAction <ActionPreference>]
[<CommonParameters>]
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.
Get-Content .\gpoowners.json | ConvertFrom-Json | Write-Output | Register-DMGPOwner
Reads all settings from the provided json file and registers them.
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
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
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
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
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
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
Type: ActionPreference
Parameter Sets: (All)
Aliases: proga
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
General notes