If I run ps script like the following, would I get consistent reliable info about my logical disks? I got percentdisktime, but other values are zero or strange long digits.
$computer = "hostname" $namespace = "root\CIMV2" Get-WmiObject -class Win32_PerfFormattedData_PerfDisk_LogicalDisk -computername $computer -namespace $namespace
You can get some data with:
$obj = new-object -com Scripting.FileSystemObject $drive = $obj.getdrive("c") $drive
$obj = new-object -com Scripting.FileSystemObject
$drive = $obj.getdrive("c")
$drive
Felipe, your post is irrelavent.
You need to understand what is logical disk before you reply.
Try run the script I post first.
Post a lot but trade off quality is no good.
Well nobody have ever complained...
I was trying to point you in another direction..
Some of the information you get querying directly a specified volume is not there when you run your script.
Maybe somebody else can help you.
Nobody complained because you are forgiven and forgotten.
This is a free forum, and we all here provide answers in our spare time. I am sure we all try and help as best as we can.
So I'd ask everyone to show due respect.
To answer part of your question: performance counters deliver real time performance data. So if you did not read anything from a particular disk lately, the values are zero. Long digits represent raw data that may be measured in ticks which are very small time units. Empty properties may result from missing access privileges (you may need to run the code as Admin), or missing media (no disk inserted).
Thanks. That is on target.
It will be nice there is an official documentation that explains what it returns. Some counters are cumulative data, some are absolute measures. I am using admin privilege and with real disks.
Since powershell left the guessing game to us, I am switching back to perfmon output into a table.
Another point to prove powershell is re-inventing wheel and not very useful at times.
Certain part of powershell is just not there yet. Missing features, for example,
$computer = "hostname" $namespace = "root\CIMV2" Get-WmiObject -class Win32_PageFile -computername $computer -namespace $namespace
My initial hope was PS can match up perfmon, therefore we have a way to verify data on a second source. And, I can program PS to retrieve data into data management warehouse.
Unfortunately, time after time, it is not available. I am going to leav this topic now with my heart broken by Powershell. You enthusiasts can continue.
Carry on. Pal.