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.
Assembly: System.Management.Automation (in System.Management.Automation.dll)
Initializes a new instance of theclass that contains the script that is used to validate the parameter argument. This constructor is introduced by Windows PowerShell 2.0.
|_Attribute.GetIDsOfNames(Guid, IntPtr, UInt32, UInt32, IntPtr)|
|_Attribute.GetTypeInfo(UInt32, UInt32, IntPtr)|
|_Attribute.Invoke(UInt32, Guid, UInt32, Int16, IntPtr, IntPtr, IntPtr, IntPtr)|
There are no established scenarios for explicitly creating a ValidateScript attribute.object from within a cmdlet. The object is created and used indirectly when a function is decorated with the
Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.