List all properties in a WMI Class

marclile

Newcomer
Joined
Mar 11, 2003
Messages
7
Just wondering if someone knows how to list all of the properties and their values from a WMI class. I know how to get the number of properties, by doing the following:

Visual Basic:
        Dim wmi As New ManagementClass("Win32_ComputerSystem")
        wmi.Get()
        MessageBox.Show(wmi.Properties.Count.ToString)

I'm just not sure how to loop through all the properties. I want to list all possible properties and their values in a ListView. Any ideas?
 
Last edited by a moderator:
Visual Basic:
Dim d As PropertyData

For Each d In wmi.Properties
'etc
Next

Something like that, maybe?
 
Back
Top