Link to home
Start Free TrialLog in
Avatar of smyers051972
smyers051972Flag for United States of America

asked on

PRTG Custom WMI Query Regarding Disk Performance Status

I am trying to figure out a way to pull disk perfmon status from windows 2008 and 2012 (will be accessing remote systems), I am particularly interested in Disk Read/Write Bytes per second.  I am intending to put this into PRTG but need to create a good powershell script, this will need to impersonate another user (service account).  Any help is greatly appreciated.


Thanks
Avatar of Gary Patterson, CISSP
Gary Patterson, CISSP
Flag of United States of America image

You can use the PS cmdlet "Get-counter", and pipe the output to Export-counter

C:\Users\mallen>Get-counter "\\servername\PhysicalDisk(*)\% Disk Time" -SampleInterval 2 -MaxSamples 100 | Export-counter -Path somepath\export.blg

Basic article:  https://technet.microsoft.com/en-us/magazine/ee872428.aspx
Get-Counter documentation: https://technet.microsoft.com/en-us/library/hh849685.aspx (lots of examples here)

This article explains how to use Get-Counter -ListSet to retrieve a dynamic list of counters (for example, if you want the counters for each physical drive on each target system, but you don't want to hardcode drive letters):

http://blogs.technet.com/b/heyscriptingguy/archive/2011/07/28/use-performance-counter-sets-and-powershell-to-ease-baselining.aspx

Note that you can specify multiple remote computers, and multiple counters in a single command.
Avatar of smyers051972

ASKER

Hello, I tested this recommendation and in part worked, I have found out they want to monitor more, there are 4 items and I am attaching the screen shot, they are highlighted in grey.
perf.png
ASKER CERTIFIED SOLUTION
Avatar of Gary Patterson, CISSP
Gary Patterson, CISSP
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks for the assist!