0

I need to check all the drives and their free available space. As for Fixed Drives we can get information using DriveInfo class (System.IO), but I need to check drive information for SAN drives.

1 Answers1

1

You need to use System.Management for that - To get hardware information, you need to create an object of ManagementObjectSearcher class.

ManagementObjectSearcher searcher = new ManagementObjectSearcher("select * from " + Key);

The Key on the code above is a variable that is replaced with appropriate data. For example, to get the information of the CPU, you have to replace the Key with Win32_Processor.

For a complete list of keys and more information please read the following https://www.codeproject.com/Articles/17973/How-To-Get-Hardware-Information-CPU-ID-MainBoard-I

Ali
  • 2,702
  • 3
  • 32
  • 54