Windows Dev Center

ValidateScriptAttribute Constructor

Initializes a new instance of the ValidateScriptAttribute class that contains the script that is used to validate the parameter argument. This constructor is introduced by Windows PowerShell 2.0.


Namespace: System.Management.Automation
Assembly: System.Management.Automation (in System.Management.Automation.dll)

'Usage
Dim scriptBlock As ScriptBlock

Dim instance As New ValidateScriptAttribute(scriptBlock)

public ValidateScriptAttribute (
	ScriptBlock scriptBlock
)
public ValidateScriptAttribute (
	ScriptBlock scriptBlock
)
public function ValidateScriptAttribute (
	scriptBlock : ScriptBlock
)

Parameters

scriptBlock

The script that is used to validate the parameter argument. The argument of the parameter is valid only when the script returns true.

 

Target Platforms


Show:
© 2015 Microsoft