18 Feb 2017 by Sabyasachi Mukherjee
I am trying to use WMI in C# to query the connected hard disk information. Basically, I am trying to convert a Powershell script to C#. However, I've hit a wall. In Powershell, I have a line:$testdrv = Get-WmiObject -Class win32_volume -Filter "DriveLetter='$DriveLetter'"Now, in C#, the...