Search code examples
powershellwmiperformancecounterwmi-query

Finding PhysicalDisk\Avg. Disk Bytes/read WMI Library


I would have thought that the above library can be reached using the following: https://msdn.microsoft.com/en-us/library/aa394308(v=vs.85).aspx

Get-WmiObject -Query "SELECT avgdiskbytesperread FROM win32_PerfRawData_PerfDisk_PhysicalDisk"

But obviously it does not as it's no where near what I'm seeing using the Windows Performance Monitor.

enter image description here

Where can I find it?


Solution

  • I was looking at the wrong place the entire time...

    https://blogs.technet.microsoft.com/georgewallace/2013/10/29/pulling-performance-counters-from-wmi-with-powershell/

    All relevant Disk based Performance Counters can be found here:

    Get-WmiObject -Query "SELECT * from Win32_PerfFormattedData_PerfDisk_PhysicalDisk"