dbatools is a free PowerShell module with over 300 SQL Server administration, best practice and migration commands included.

Please note that documentation and command names may be out of date while we work furiously towards 1.0


Get-DbaPfDataCollectorCounter

Gets Performance Counters.

Screenshots

dbatools-Get-DbaPfDataCollectorCounter

Examples

Gets all counters for all Collector Sets on localhost.

Get-DbaPfDataCollectorCounter

Gets all counters for all Collector Sets on on sql2017.

Get-DbaPfDataCollectorCounter -ComputerName sql2017

Gets the ‘\Processor(_Total)\% Processor Time’ counter on sql2017.

Get-DbaPfDataCollectorCounter -ComputerName sql2017 -Counter ‘\Processor(_Total)\% Processor Time’

Gets all counters for the ‘System Correlation’ CollectorSet on sql2017 and sql2016 using alternative credentials.

Get-DbaPfDataCollectorCounter -ComputerName sql2017, sql2016 -Credential (Get-Credential) -CollectorSet ‘System Correlation’

Gets all counters for the ‘System Correlation’ CollectorSet.

Get-DbaPfDataCollectorSet -CollectorSet ‘System Correlation’ | Get-DbaPfDataCollector | Get-DbaPfDataCollectorCounter

Author

This command was created by Chrissy LeMaire. You can find Chrissy on Twitter.

Get-Help

From PowerShell, execute Get-Help Get-DbaPfDataCollectorCounter -Detailed for more information on this function.

Source Code

Want to see the source code? View Get-DbaPfDataCollectorCounter.ps1 on GitHub
 

Related commands