Main | Contact | Blog | Documentation

PowerShell Framework

The project dedicated to empowering your PowerShell scripting.

Register-PSFConfigValidation

SYNOPSIS

Registers a validation scriptblock for use with the configuration system.

SYNTAX

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

DESCRIPTION

Registers a validation scriptblock for use with the configuration system.

The scriptblock must be designed according to a few guidelines:

EXAMPLES

EXAMPLE 1

Register-PSFConfigValidation -Name IntPositive -ScriptBlock $scriptblock

Registers the scriptblock stored in $scriptblock as validation with the name IntPositive

PARAMETERS

-Name

The name under which to register the validation scriptblock

Type: String
Parameter Sets: (All)
Aliases:

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

-ScriptBlock

The scriptblock to register

Type: ScriptBlock
Parameter Sets: (All)
Aliases:

Required: True
Position: 2
Default value: None
Accept pipeline input: False
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 (http://go.microsoft.com/fwlink/?LinkID=113216).

INPUTS

OUTPUTS

NOTES