Set-AdmfContext
SYNOPSIS
Applies a set of configuration contexts.
SYNTAX
name (Default)
Set-AdmfContext -Context <Object[]> [-ReUse] [-DefineOnly] [-Server <ComputerParameter>]
[-Credential <pscredential>] [-DnsDomain <string>] [-NoDomain] [-EnableException]
[<CommonParameters>]
interactive
Set-AdmfContext [-Interactive] [-ReUse] [-DefineOnly] [-Server <ComputerParameter>]
[-Credential <pscredential>] [-DnsDomain <string>] [-NoDomain] [-EnableException]
[<CommonParameters>]
DESCRIPTION
Applies a set of configuration contexts. This merges the settings from all selected contexts into one configuration set.
EXAMPLES
EXAMPLE 1
Set-AdmfContext -Interactive
Interactively pick to select the contexts to apply to the user's own domain.
EXAMPLE 2
Set-AdmfContext -Interactive -Server contoso.com
Interactively pick to select the contexts to apply to the contoso.com domain.
EXAMPLE 3
Set-AdmfContext -Context Default, Production, Europe -Server eu.contoso.com
Configures the contexts Default, Production and Europe to be applied to eu.contoso.com.
PARAMETERS
-Context
Name of context or full context object to apply.
Type: System.Object[]
DefaultValue: ''
SupportsWildcards: false
Aliases:
- Name
ParameterSets:
- Name: name
Position: Named
IsRequired: true
ValueFromPipeline: true
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-Credential
The credentials to use for this operation.
Type: System.Management.Automation.PSCredential
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-DefineOnly
Do not actually switch configuration sets. Just register the selected Contexts to the target domain, after validating the selection.
Type: System.Management.Automation.SwitchParameter
DefaultValue: False
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-DnsDomain
The DNS Name of the domain to target. Removes the need for AD Resolution of the domain, potentially speeding up the -DefineOnly workflow.
Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-EnableException
This parameters disables user-friendly warnings and enables the throwing of exceptions. This is less user friendly, but allows catching exceptions in calling scripts.
Type: System.Management.Automation.SwitchParameter
DefaultValue: False
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-Interactive
Show an interactive context selection prompt. This is designed for greater convenience when managing many forests. The system automatically uses Set-AdmfContext with this parameter when directly testing or invoking against a new domain without first selecting a context to apply.
Type: System.Management.Automation.SwitchParameter
DefaultValue: False
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: interactive
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-NoDomain
If used against a target without a domain, it will skip AD connect and instead use the server name for Context caching purposes.
Type: System.Management.Automation.SwitchParameter
DefaultValue: False
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-ReUse
ADMF remembers the last contexts assigned to a specific server/domain. By setting this parameter, it will re-use those contexts, rather than show the prompt again. This parameter is used by the system to prevent prompting automatically on each call.
Type: System.Management.Automation.SwitchParameter
DefaultValue: False
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-Server
The server / domain to work with.
Type: PSFramework.Parameter.ComputerParameter
DefaultValue: $env:USERDNSDOMAIN
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
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.