Tests if a performance counter exists.
Test-PerformanceCounter [-CategoryName] <String> [-Name] <String> [<CommonParameters>]
Returns True if counter Name exists in category CategoryName. False if it does not exist or the category doesn't exist.
| Name | Type | Description | Required? | Pipeline Input | Default Value |
|---|---|---|---|---|---|
| CategoryName | String | The category's name where the performance counter exists. Or might exist. As the case may be. |
true | false | |
| Name | String | The performance counter's name. |
true | false |
Test-PerformanceCounter -CategoryName 'ToyotaCamry' -Name 'MilesPerGallon'
Returns True if the ToyotaCamry performance counter category has a MilesPerGallon counter. False if the counter doesn't exist.