Skip to main content

New-AdmfContext

SYNOPSIS

Creates a new configuration context for ADMF.

SYNTAX

Store (Default)

New-AdmfContext -Name <string> [-Store <string>] [-Weight <int>] [-Description <string>]
[-Author <string>] [-Group <string>] [-Prerequisite <string[]>] [-MutuallyExclusive <string[]>]
[-Components <string[]>] [-DefaultAccessRules] [-ExchangeAccessRules <string>] [-Force]
[-EnableException] [<CommonParameters>]

Path

New-AdmfContext -Name <string> [-OutPath <string>] [-Weight <int>] [-Description <string>]
[-Author <string>] [-Group <string>] [-Prerequisite <string[]>] [-MutuallyExclusive <string[]>]
[-Components <string[]>] [-DefaultAccessRules] [-ExchangeAccessRules <string>] [-Force]
[-EnableException] [<CommonParameters>]

DESCRIPTION

Creates a new configuration context for ADMF. Contexts are a set of configuration settings. You can combine multiple contexts at the same time, merging the settings they contain.

For more details on how contexts work, see:

Get-Help about_ADMF_Context

EXAMPLES

EXAMPLE 1

New-AdmfContext -Name 'newContext'

Creates a new context named "newContext"

EXAMPLE 2

New-AdmfContext -Name 'Contoso_Baseline' -Store Company -Weight 10 -Author "Sad Joey" -DefaultccessRules -Description "Default baseline for contoso company forests"

Creates a new context ...

  • Named "Contoso_Baseline"
  • In the context store "Company"
  • With the weight 10 (very low, causing it to be one of the first to be applied)
  • By Sad Joey (a great and non-sad person)
  • that contains the default access rules
  • has a useful description of what it is for

PARAMETERS

-Author

The author of the context (for documentation purposes only)

Type: System.String
DefaultValue: <Insert your name here>
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-Components

What extra components to include in the new context

Type: System.String[]
DefaultValue: '@()'
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-DefaultAccessRules

A new Active Directory environment comes with more deployed security delegations than defined in the schema. Several containers - especially the BuiltIn container - have a lot of extra access rules. When deploying a restrictive domain content mode, where these objects fall under management, it becomes necessary to also configure these delegations, lest they be removed. Setting this switch will include all the default delegations in your new context.

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: ''

-Description

Add a description to your context (for documentation purposes only).

Type: System.String
DefaultValue: <Insert description-text here>
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: ''

-ExchangeAccessRules

Whether to include the default permissions installing Exchange into an Active Directory domain brings.

Type: System.String
DefaultValue: None
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-Force

This command refuses to replace an existing context by default. Using force, it is a bit more brutish and will kill any previously existing context with the same name in the target store.

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: ''

-Group

The group to assign the context to. By default, will be part of the "Default" group. Groups are only relevant fpr the itneractive context selection menu, where they govern the visual display style / grouping.

Type: System.String
DefaultValue: Default
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-MutuallyExclusive

Contexts that are mutually exclusive with each other. E.g.: Where the user has to select between one of several environments.

Type: System.String[]
DefaultValue: '@()'
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-Name

The name of the context to create.

Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: true
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-OutPath

Create the context in a target path, rather than a registered store. Keep in mind, that this will require the context to be manually moved to a registered location in order for it to become available to use.

Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: Path
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-Prerequisite

Contexts the current context depends on / requires.

Type: System.String[]
DefaultValue: '@()'
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-Store

The context store to create the context in. Context Stores are registered filesystem locations where ADMF will look for contexts. Defaults to the default store found in %AppData%.

Type: System.String
DefaultValue: Default
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: Store
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-Weight

The priority of the context. This is used to determine the import order when importing multiple contexts. The higher the value, the later in the import order. Default: 50

Type: System.Int32
DefaultValue: 50
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.