title: Getting Data from WIN32_PnPDeviceProperty using C#
body: <p>I read data from class WIN32_PnPDeviceProperty using Powershell and command PS
  C:&gt; Get-PnpDeviceProperty -InstanceId ''.</p>
  <p>Similarly I want to read data using C# framework, so I wrote sample code like follow</p>
  <pre><code>            ObjectQuery query = new ObjectQuery(&quot;SELECT * FROM SWD\\PRINTENUM\\{E82E5EFD-6616-4E4F-9A96-7D94554A8BF0}&quot;);
          ManagementObjectSearcher deviceSearch = new ManagementObjectSearcher(query);
          foreach (ManagementObject device in deviceSearch.Get())
          {
              try
              {
                  Console.WriteLine(&quot;Driver ----------------------------------------&quot;);
                  foreach (var item in device.Properties)
                      Console.WriteLine(&quot;{0}      :   {1}&quot;,item.Name,item.Value);
  
                  Console.WriteLine();
              }
              catch (Exception ex) { Console.WriteLine(ex.Message); }
          }
  </code></pre>
  <p>But Query returns empty. I am not entirely sure the way to run query or get info using above method is correct or not.</p>
  <p>Is there any other way to read data from the mentioned class ?</p>