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

No Comments