PSTypeNameAttribute PSTypeNameAttribute PSTypeNameAttribute Class

Definition

Specifies PSTypeName of a cmdlet or function parameter.

[System.AttributeUsage(System.AttributeTargets.Property | System.AttributeTargets.Field, AllowMultiple=false)]
public class PSTypeNameAttribute : Attribute
type PSTypeNameAttribute = class
    inherit Attribute
Public Class PSTypeNameAttribute
Inherits Attribute
Inheritance
PSTypeNameAttributePSTypeNameAttributePSTypeNameAttribute
Attributes

Remarks

This attribute is used to restrict the type name of the parameter, when the type goes beyond the .NET type system.
For example one could say: [PSTypeName("System.Management.ManagementObject#root\cimv2\Win32_Process")]
to only allow Win32_Process objects to be bound to the parameter.

Constructors

PSTypeNameAttribute(String) PSTypeNameAttribute(String) PSTypeNameAttribute(String)

Creates a new PSTypeNameAttribute

Properties

PSTypeName PSTypeName PSTypeName

Applies to