Performance monitoring helps you watch for adverse conditions and take appropriate action to resolve them. Windows PowerShell has several commands for this purpose, and in this section, we’ll look at the ones you’ll use the most.
Commands you can use to monitor performance include:
Get-Counter. Gets objects representing real-time performance counter data directly from the performance monitoring instrumentation in Windows. You can list the performance counter sets and the counters that they contain, set the sample size and interval, and specify the credentials of users with permission to collect performance data.
Get-Counter [-MaxSamples NumSamples] [-Counter] CounterPaths [-SampleInterval ...