How to use C# typeof in Powershell

Have you ever missed C#'s "typeof" while working with PowerShell?

PS C:\> [System.Type]::GetType("System.Enum") 

IsPublic IsSerial Name                                     BaseType
-------- -------- ----                                     --------
True     True     Enum                                     System.ValueType

PS C:\> typeof System.Enum

IsPublic IsSerial Name                                     BaseType
-------- -------- ----                                     --------
True     True     Enum                                     System.ValueType ...



Read full article

Published 21 August 2007 09:14 PM by Daniel Cazzulino

Comments

No Comments

Search

Go

This Blog

News

     

      Microsoft MVP Profile

Syndication