Is Win32_PerfFormattedData_PerfDisk_PhysicalDisk missing from WMI in Vista?
Posted
by Martin
on Stack Overflow
See other posts from Stack Overflow
or by Martin
Published on 2010-03-30T05:22:29Z
Indexed on
2010/03/30
5:33 UTC
Read the original article
Hit count: 321
From what I understand, the following script should work in Windows XP and higher, but it doesn't work for me in Vista Business 32-bit Service Pack 2. Thus far I have been very unsuccessful googling for information about this performance class.
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colApps = objWMIService.ExecQuery("Select * from Win32_PerfFormattedData_PerfDisk_PhysicalDisk")
For Each objApp in colApps
Wscript.Echo objApp.Caption
Next
Does this WMI class simply not exist in Vista? If it is just me, is there a way to fix WMI? I have already tried running winmgmt /resetrepository and winmgmt /resyncperf and neither helps.
© Stack Overflow or respective owner