Skip to Main Content
Windows Server 2019 Automation with PowerShell Cookbook - Third Edition
book

Windows Server 2019 Automation with PowerShell Cookbook - Third Edition

by Thomas Lee
February 2019
Beginner to intermediate content levelBeginner to intermediate
542 pages
10h 34m
English
Packt Publishing
Content preview from Windows Server 2019 Automation with PowerShell Cookbook - Third Edition

Using WMI to retrieve performance counters

Another way to access performance information is via WMI. You can use either the WMI or the CIM cmdlets to access a large number of performance counters, as an alternative to using Get-Counter.

When using WMI, the naming structure for counter information is different from using Get-Counter. With WMI, counters are exposed via separate WMI classes whose names are slightly different from those you use with Get-Counter. Effectively, with WMI, each performance counter set is a WMI class.

You find the WMI performance counters in the ROOT\CimV2 namespace; they have names that begin with Win32_Perf. For example, the Memory performance counter set contains 36 separate counters. The Win32_PerfFormattedData_PerfOS_Memory ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Windows Server Automation with PowerShell Cookbook, Fifth Edition - Fifth Edition

Windows Server Automation with PowerShell Cookbook, Fifth Edition - Fifth Edition

Thomas Lee

Publisher Resources

ISBN: 9781789808537OtherErrata PagePurchase Link