Windows desktop applications
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

ValidateScriptAttribute Class

 

Updated: April 27, 2016

Applies To: Windows PowerShell

Defines an attribute that uses a script to validate a parameter of any Windows PowerShell function. (This attribute cannot be used to validate the argument of a cmdlet parameter.) This class cannot be inherited. This class is introduced in Windows PowerShell 2.0.

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


public ref class ValidateScriptAttribute sealed : ValidateEnumeratedArgumentsAttribute

NameDescription
System_CAPS_pubmethodValidateScriptAttribute(ScriptBlock^)

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.

NameDescription
System_CAPS_pubpropertyScriptBlock

Gets the script that is used to validate the parameter argument. This property is introduced in Windows PowerShell 2.0.

System_CAPS_pubpropertyTypeId

(Inherited from Attribute.)

NameDescription
System_CAPS_pubmethodEquals(Object^)

(Inherited from Attribute.)

System_CAPS_pubmethodGetHashCode()

(Inherited from Attribute.)

System_CAPS_pubmethodGetType()

(Inherited from Object.)

System_CAPS_pubmethodIsDefaultAttribute()

(Inherited from Attribute.)

System_CAPS_pubmethodMatch(Object^)

(Inherited from Attribute.)

System_CAPS_pubmethodToString()

(Inherited from Object.)

There are no established scenarios for explicitly creating a ValidateScriptAttribute object from within a cmdlet. The ValidateScriptAttribute object is created and used indirectly when a function is decorated with the ValidateScript attribute.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show:
© 2016 Microsoft