Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

PSTypeName Class

Definition

Namespace:
System.Management.Automation
Assembly:
System.Management.Automation.dll
Package:
Microsoft.PowerShell.5.1.ReferenceAssemblies v1.0.0
Package:
System.Management.Automation v7.4.15
Package:
System.Management.Automation v7.5.6
Package:
System.Management.Automation v7.6.1

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

Represents Type, but can be used where a real type might not be available, in which case the name of the type can be used.

public ref class PSTypeName
public class PSTypeName
type PSTypeName = class
Public Class PSTypeName
Inheritance
PSTypeName

Constructors

Name Description
PSTypeName(ITypeName)

This constructor creates a type from a ITypeName.

PSTypeName(String, Type)

This constructor is used when the creating a PSObject with a custom typename.

PSTypeName(String)

This constructor is used when the type may not exist, or is not loaded.

PSTypeName(Type)

This constructor is used when the type exists and is currently loaded.

PSTypeName(TypeDefinitionAst)

This constructor is used when the type is defined in PowerShell.

Properties

Name Description
Name

Return the name of the type.

Type

Return the type with metadata, or null if the type is not loaded.

TypeDefinitionAst

When a type is defined by PowerShell, the ast for that type.

Methods

Name Description
ToString()

Returns a String that represents the current PSTypeName.

Applies to