O'Reilly logo

Windows Server 2016 Automation with PowerShell Cookbook - Second Edition by Thomas Lee

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

How it works...

In this recipe, you use Get-CimClass to discover WMI performance classes within the Root/CimV2 namespace. You also use the Get-CimInstance cmdlet to retrieve performance information.

In step 1, you use the Get-CimClass to find the performance counter classes implemented on your system. You look at the general performance classes, then the formatted and raw classes as you discover the total number of performance classes and the number that are either raw or formatted (cooked). For the performance counters supported in WMI, there are two classes for each counter: a raw class and a cooked class. The former returns raw counter values and the latter returns cooked counter values as shown:

In step 2, you look at some of the most ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required