Register-DMGPLink
SYNOPSIS
Registers a group policy link as a desired state.
SYNTAX
Path
Register-DMGPLink -PolicyName <string> -OrganizationalUnit <string> -Precedence <int> [-Tier <int>]
[-State <string>] [-ProcessingMode <string>] [-Present <bool>] [-ContextName <string>]
[<CommonParameters>]
Filter
Register-DMGPLink -PolicyName <string> -OUFilter <string> -Precedence <int> [-Tier <int>]
[-State <string>] [-ProcessingMode <string>] [-Present <bool>] [-ContextName <string>]
[<CommonParameters>]
DESCRIPTION
Registers a group policy link as a desired state.
EXAMPLES
EXAMPLE 1
Get-Content $configPath | ConvertFrom-Json | Write-Output | Register-DMGPLink
Import all GPLinks stored in the json file located at $configPath.
PARAMETERS
-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: System.String
DefaultValue: <Undefined>
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-OrganizationalUnit
The organizational unit (or domain root) being linked to. Supports string expansion.
Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases:
- OU
ParameterSets:
- Name: Path
Position: Named
IsRequired: true
ValueFromPipeline: false
ValueFromPipelineByPropertyName: true
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-OUFilter
A filter string for an organizational unit. The filter must be a wildcard-pattern supporting distinguishedname.
Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: Filter
Position: Named
IsRequired: true
ValueFromPipeline: false
ValueFromPipelineByPropertyName: true
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-PolicyName
The name of the group policy being linked. Supports string expansion.
Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: true
ValueFromPipeline: false
ValueFromPipelineByPropertyName: true
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-Precedence
Numeric value representing the order it is linked in. The lower the number, the higher on the list, the more relevant the setting.
Type: System.Int32
DefaultValue: 0
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: true
ValueFromPipeline: false
ValueFromPipelineByPropertyName: true
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-Present
Whether the link should be present at all. Relevant in additive mode, to retain the capability to delete undesired links.
Type: System.Boolean
DefaultValue: True
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: true
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-ProcessingMode
In which way GPO links are being processed:
- Additive: Add provided links, but do not modify the existing ones.
- Constrained: Replace existing links that are undesired By default, constrained mode is being used. If any single link for a given Organizational Unit is in constrained mode, the entire OU is processed under constraind mode.
Type: System.String
DefaultValue: Constrained
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: true
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-State
The state the link should be in. Supported states:
- Enabled: Link should be enabled
- Disabled: Link should be disabled
- Enforced: Link is being enforced
- Undefined: The current state of the link is ignored Defaults to: Enabled
Type: System.String
DefaultValue: Enabled
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: true
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-Tier
The tier of a link is a priority ordering on top of Precedence. While precedence determines order within a given tier, each tier is processed separately. The higher the tier number, the higher the priority. In additive mode, already existing linked policies have a Tier 0 priority. If you want your own policies to be prepended, use Tier 1 or higher. If you want your own policies to have the least priority however, user Tier -1 or lower. Default: 1
Type: System.Int32
DefaultValue: 1
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: true
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.