< Back

Test-CPerformanceCounter

Sun Jan 12, 2020 11:27 pm

NAME Test-CPerformanceCounter



SYNOPSIS

Tests if a performance counter exists.





SYNTAX

Test-CPerformanceCounter [-CategoryName] <String> [-Name] <String> [<CommonParameters>]





DESCRIPTION

Returns `True` if counter `Name` exists in category `CategoryName`. `False` if it does not exist or the category

doesn't exist.





PARAMETERS

-CategoryName <String>

The category's name where the performance counter exists. Or might exist. As the case may be.



Required? true

Position? 1

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Name <String>

The performance counter's name.



Required? true

Position? 2

Default value

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS



-------------------------- EXAMPLE 1 --------------------------



PS C:\\>Test-CPerformanceCounter -CategoryName 'ToyotaCamry' -Name 'MilesPerGallon'



Returns `True` if the `ToyotaCamry` performance counter category has a `MilesPerGallon` counter. `False` if the

counter doesn't exist.











RELATED LINKS