title: Get Disk IO performance counter
body: <p>I need to get Page Faults and Disk IO of system while a particular process is running.</p>
  
  <p>I can get Page Faults but not able to get Disk IO:</p>
  
  <pre><code> $arrayDIO = @()
   $arrayPf = @()
   $cmdProcess = start-process cmd -passthru
     while (-not $cmdProcess.HasExited) {
          $arrayDIO += %{ (Get-WmiObject Win32_PerfFormattedData_PerfProc_Process).IOWriteOperationsPerSec }
          $arrayPf += %{ (Get-WmiObject Win32_PerfFormattedData_PerfOS_memory).PageFaultsPerSec }
      sleep 2
    }
   $arrayPf | Measure-Object -Average -Maximum -Minimum | Out-File  -Filepath C:\Details.txt
   $arrayDIO | Measure-Object -Average -Maximum -Minimum | Out-File  -Filepath C:\Details.txt -append
  </code></pre>