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.

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Gary PattersonVP Technology / Senior Consultant Commented:
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:
Get-Counter documentation: (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):

Note that you can specify multiple remote computers, and multiple counters in a single command.
smyers051972Author Commented:
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.
Gary PattersonVP Technology / Senior Consultant Commented:
No problem, just create an array containing the counters you want

$counters = @()
$counters += '\Memory\Available Bytes'
$counters += '\Paging File(*)\% Usage'
$counters += '\PhysicalDisk(*)\Disk Reads/sec'
$counters += '\PhysicalDisk(*)\Disk Writes/sec'
$counters += '\PhysicalDisk(*)\Avg. Disk sec/Read'
$counters += '\PhysicalDisk(*)\Avg. Disk sec/Write'
$counters += '\Processor(*)\% Processor Time'
$counters += '\System\Processor Queue Length'
Get-counter $counters -SampleInterval 2 -MaxSamples 5

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
smyers051972Author Commented:
Thanks for the assist!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows Server 2012

From novice to tech pro — start learning today.