O'Reilly logo

Windows PowerShell™ Scripting Guide by Ed Wilson

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

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.

Performance counter classes displayed in the Performance Monitor tool.

Figure 7-9. Performance counter classes displayed ...

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