Condividi tramite


PSTypeNameAttribute Class

Definition

Specifies PSTypeName of a cmdlet or function parameter.

public ref class PSTypeNameAttribute : Attribute
[System.AttributeUsage(System.AttributeTargets.Field | System.AttributeTargets.Property, AllowMultiple=false)]
public class PSTypeNameAttribute : Attribute
[<System.AttributeUsage(System.AttributeTargets.Field | System.AttributeTargets.Property, AllowMultiple=false)>]
type PSTypeNameAttribute = class
    inherit Attribute
Public Class PSTypeNameAttribute
Inherits Attribute
Inheritance
PSTypeNameAttribute
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)

Creates a new PSTypeNameAttribute.

Properties

PSTypeName

Applies to