View Object Inheritance

by Aug 31, 2010

A hidden object property called "PSTypeNames" will tell you the object type as well as the inherited chain:

(Get-WMIObject Win32_BIOS).PSTypeNames

In contrast to GetType(), this property will work for all objects, including COM objects. The most specific type is always found at the beginning of that array:

(Get-WMIObject Win32_BIOS).PSTypeNames[0]

Twitter This Tip! ReTweet this Tip!