
Part of the, er, power of collecting metrics with Powershell is that you can choose between real-time performance data for spot-checking, or sampling metric values over time for historical trending (by using the -MaxSamples and -SampleInterval command line arguments).Ĭollecting performance metrics with Powershell using the Get-Counter cmdlet follows a straightforward syntax: Get-Counter -Counter \

A Powershell tutorial is beyond the scope of this article, but Microsoft has tutorials for the uninitiated.Īll of the metrics and events listed in part one of this series can be collected with Powershell: For example, Remove-Item is functionally similar to rm on Unix-like systems. Powershell commands are referred to as cmdlets, and follow a strict Verb-Noun naming convention. Powershell is one of the most dynamic and powerful ways to get information about a Windows system (and, with Powershell available on other platforms, other systems as well).
