View Object Inheritance

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!


Posted Aug 31 2010, 08:00 AM by ps1
Concentrated Tech NSoftware Dell Compellent Sponsored by Idera and Concentrated Tech and NSoftware and Dell Compellent
Copyright 2011 PowerShell.com. All rights reserved.