Configuration driven Active Directory management.
Create an ADMF Client PowerShell module.
New-AdmfContextModule [-Name] <Object> [-Repository] <String> [-Path] <String> [-ModuleName] <String>
[[-ModuleOption] <String[]>] [[-AliasPrefix] <String>] [[-ModuleVersion] <Version>]
[[-Credential] <PSCredential>] [[-ModuleCode] <ScriptBlock>] [-GetV3] [-ProgressAction <ActionPreference>]
[<CommonParameters>]
Create an ADMF Client PowerShell module. Specify which contexts to use from a repository to which they have previously been published.
It will then dynamically create a PowerShell module containing all contexts and their dependencies and publish them under its own Context store once imported.
New-AdmfContextModule -Name Default -Repository Contoso -Path . -ModuleName Whatever -ModuleOption Confirm -AliasPrefix WE
Retrieves the “Default” context from the “Contoso” repository. It will then wrap it into a module named “Whatever”, injecting a requirement to confirm all changes and include aliases for the common ADMF commands with the WE prefix (e.g. Test-WEDomain)
Name of the contexts to include. Supports plain “Name” or the PowerShell module notation. Examples: “Default” @{ ModuleName = ‘SecBaseline’ } @{ ModuleName = ‘SecBaseline’; ModuleVersion = ‘2.0.0’ } @{ ModuleName = ‘SecBaseline’; RequiredVersion = ‘2.3.1’ }
Type: Object
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Name of the repository to download from.
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Path where to write the finished module to.
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Name of the module to generate.
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Additional options to include in the module code when generating the module. Confirm: Injects all ADMF component modules with the requirement to confirm all changes.
Type: String[]
Parameter Sets: (All)
Aliases:
Required: False
Position: 5
Default value: Confirm
Accept pipeline input: False
Accept wildcard characters: False
Create aliases for the common ADMF commands. This simplifies guiding users into loading the module containing their configuration settings. Rather than having them run Test-ADMFDomain, you could have them run Test-ConDomain, which would then implicitly load the generated module and make the contexts available, without having to first manually import the module generated.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 6
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
The version of the module to generate. Defaults to 1.0.0
Type: Version
Parameter Sets: (All)
Aliases:
Required: False
Position: 7
Default value: 1.0.0
Accept pipeline input: False
Accept wildcard characters: False
Credentials to use for accessing the powershell repository.
Type: PSCredential
Parameter Sets: (All)
Aliases:
Required: False
Position: 8
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Additional code to iunclude in the module generated
Type: ScriptBlock
Parameter Sets: (All)
Aliases:
Required: False
Position: 9
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Use PowerShellGet V3 or later. Defaults to the configuration setting of ADMF.PowerShellGet.UseV3.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
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.