How can I use a command line to get my Windows Vista machine's performance scores?
John Savill
January 8, 2007
1 Min Read
A. A. Vista's new Windows System Assessment Tool (WinSAT) performance scores have a Windows Management Instrumentation (WMI) class--Win32_WinSAT--which retrieves the WinSAT scores. The following script, which you download at http://www.windowsitpro.com/content/content/94815/winsat.zip , shows the code to use to get the performance scores:
strComputer = "."
Set objWMIService = GetObject("winmgmts:\" & strComputer & "rootcimv2")
Set colItems = objWMIService.ExecQuery("Select * From Win32_WinSAT")
For Each objItem in colItems
Wscript.Echo "Processor: " & objItem.CPUScore
Wscript.Echo "Memory: " & objItem.MemoryScore
Wscript.Echo "Primary hard disk: " & objItem.DiskScore
Wscript.Echo "Graphics: " & objItem.GraphicsScore
Wscript.Echo "Gaming graphics: " & objItem.D3Dscore
Wscript.Echo "Windows System Performance Rating: " & objItem.WinSPRLevel
Next
The following command starts the script:
D:temp>cscript winsatscore.vbs
and produces this output on my machine:
Processor: 4.7
Memory: 4.9
Primary hard disk: 5
Graphics: 3.3
Gaming graphics: 3
Windows System Performance Rating: 3
About the Author
Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.
You May Also Like