Monitoring Performance
Using the WMI performance classes, you can obtain sophisticated and accurate performance information. The Win32_perfrawdata_perfdisk_logicaldisk WMI class provides access to the same performance counter information that is available via the Performance Monitor tool. All the classes in the tool, shown in Figure 7-9 are available by script. The good thing about being able to access this information from a script, rather than only through the Microsoft Management Console, is that you can more easily target specific properties and even take action if desired when values go out of spec.
Figure 7-9. Performance counter classes displayed ...
Get Windows PowerShell™ Scripting Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.