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.

PSTypeNameAttribute Class

 

Updated: April 27, 2016

Applies To: Windows PowerShell

Specifies the PSTypeName of a cmdlet or function parameter. Introduced in Windows PowerShell 3.0.

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

System::Object
  System::Attribute
    System.Management.Automation::PSTypeNameAttribute

[AttributeUsageAttribute(AttributeTargets::Property | AttributeTargets::Field, 
	AllowMultiple = false)]
public ref class PSTypeNameAttribute : Attribute

NameDescription
System_CAPS_pubmethodPSTypeNameAttribute(String^)

Initializes a new instance of the PSTypeNameAttribute class. Introduced in Windows PowerShell 3.0.

NameDescription
System_CAPS_pubpropertyPSTypeName

Gets the Windows PowerShell type name. Introduced in Windows PowerShell 3.0.

System_CAPS_pubpropertyTypeId

(Inherited from Attribute.)

NameDescription
System_CAPS_pubmethodEquals(Object^)

(Inherited from Attribute.)

System_CAPS_protmethodFinalize()

(Inherited from Object.)

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_protmethodMemberwiseClone()

(Inherited from Object.)

System_CAPS_pubmethodToString()

(Inherited from Object.)

This attribute is used to restrict the type name of the parameter, when the type goes beyond the .NET type system.

For example, the [PSTypeName("System.Management.ManagementObject#root\cimv2\Win32_Process")] attribute declaration only allows Win32_Process objects to be bound to the parameter.

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: