Active Directory Management Framework

Configuration driven Active Directory management.

Register-FMCallback

SYNOPSIS

Registers a scriptblock to be called when invoking any Test- or Invoke- command.

SYNTAX

Register-FMCallback [-Name] <String> [-ScriptBlock] <ScriptBlock> [<CommonParameters>]

DESCRIPTION

Registers a scriptblock to be called when invoking any Test- or Invoke- command. This enables extending the module and ensuring correct configuration loading. The scriptblock will receive four arguments:

For more details on this system, call: Get-Help about_FM_callbacks

EXAMPLES

EXAMPLE 1

Register-FMCallback -Name MyCompany -Scriptblock $scriptblock

Registers the scriptblock stored in $scriptblock under the name ‘MyCompany’

PARAMETERS

-Name

The name of the callback to register (multiple can be active at any given moment).

Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ScriptBlock

The scriptblock containing the callback logic.

Type: ScriptBlock
Parameter Sets: (All)
Aliases:

Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

OUTPUTS

NOTES