This article mainly concentrates on retrieving the hardware information of a system. All of the examples in this article can be directly tested, by simply copying and pasting the entire code (of each section) in any text file with the extension .HTM and opening the file using Microsoft Internet Explorer (preferably 5.5+).
The above code would automatically list all the devices (which are part of hardware) along with their descriptions, device types and other information. To retrieve device information, I used the built-in class “Win32_OnBoardDevice.” The class internally has a lot of properties, methods and events. But, in the above example we concentrated only on the properties “Description,” “DeviceType,” “Enabled” and “Tag” (related to “Win32_OnBoardDevice” class).
In general, there will be many types of devices “OnBoard.” The devices include Video, SCSI controller, Ethernet (especially for LAN), and so on. The “DeviceType” property explains the type of device being represented. The following is the table extracted from MSDN to provide you with an explanation of those values returned by “DeviceType.”
The “for” loop I used in the above code iterates for every device present in the system and finally retrieves only the properties of that device. Please be aware that your system may become unresponsive when using this script as it will take a while to retrieve all of the hardware information.