Contact Info

Crumbtrail » Administration » Powershell » Powershell 2.0 » Get-Counter

Get-Counter - Powershell 2.0 CmdLet

Microsoft Windows PowerShell is a command-line shell and scripting tool based on the Microsoft .NET Framework. It is designed for system administrators, engineers and developers to control and automate the administration of Windows and applications.

More than hundred command-line tools (so called "cmdlets") can be used to perform system administration tasks and Windows Management Instrumentation (WMI). These cmdlets are easy to use, with standard naming conventions and common parameters, and standard tools for piping, sorting, filtering, and formatting data and objects.


Short description
Gets performance counter data from local and remote computers.

Get-Counter [-Counter] <string[]> [-ComputerName <string[]>] [-Continuous] [-MaxSamples <Int64>] [-SampleInterval <
int>] [<CommonParameters>]

Get-Counter -ListSet <string[]> [-ComputerName <string[]>] [<CommonParameters>]

The Get-Counter cmdlet gets live, real-time performance counter data directly from the performance monitoring instr
umentation in Windows.  You can use it to get performance data from the local or remote computers at the sample int
erval that you specify.

Without parameters, a "Get-Counter" command gets counter data for a set of system counters. 

You can use the parameters of Get-Counter to specify one or more computers, to list the performance counter sets an
d the counters that they contain, and to set the sample size and interval.