What are some common WMI queries

I am creating a C # monitor application that uses WMI to capture some performance characteristics of a remote computer. What are some good WMI queries for getting useful statistics like CPU usage, RAM usage, free hard disk space, etc.

For example, you can get the processor load from the "LoadPercentage" property with the query "SELECT * FROM Win32_Processor".

What other useful properties and queries?

+2
source share
4 answers

I think it is a little difficult to recommend a couple of classes, in particular, because WMI is extensive and depends on the type of information you want to receive.

My recommendation is that you see the following links.

+2

, . , - ( ) .

  • - Win32_ComputerSystem
  • - Win32_OperatingSystem
  • - Win32_Processor
  • HDD - Win32_DiskDrive
  • - Win32_DiskPartition
  • - Win32_LogicalDisk
  • - Win32_LogicalDiskToPartition
  • - Win32_PhysicalMemory, Win32_PhysicalMemoryArray
  • - Win32_NetworkAdapter ( , ), Win32_NetworkAdapterConfiguration

  • - Win32_PerfRawData_PerfOS_Processor
  • - Win32_PerfRawData_PerfOS_Memory
  • - Win32_PerfRawData_Tcpip_NetworkInterface

, , .

+1

You would rate http://gallery.technet.microsoft.com/scriptcenter/en-us . It is very well organized. I received all the requests for the above features that you mentioned on this website and basically just copied and pasted.

0
source

You can also use Win32_Products.

This gives you all the ready-made software on the machine. You can use WMI to recover / remove these products. Very useful on remote machines.

0
source

All Articles