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-DbaPfDataCollectorCounterSample

Gets Performance Counter Samples.

Screenshots

dbatools-Get-DbaPfCounterSample

Examples

Gets a single sample for all counters for all Collector Sets on localhost.

Get-DbaPfDataCollectorCounterSample

Gets a single sample for all counters for all Collector Sets on localhost.

Get-DbaPfDataCollectorCounterSample -Counter ‘\Processor(_Total)\% Processor Time’

Gets 10 samples for all counters for all Collector Sets for servers sql2016 and sql2017.

Get-DbaPfDataCollectorCounter -ComputerName sql2017, sql2016 | Out-GridView -PassThru | Get-DbaPfDataCollectorCounterSample -MaxSamples 10

Gets a single sample for all counters for all Collector Sets on sql2017.

Get-DbaPfDataCollectorCounterSample -ComputerName sql2017

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

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

Gets a single sample for all counters for the ‘System Correlation’ CollectorSet.

Get-DbaPfDataCollectorCounterSample -CollectorSet ‘System Correlation’

Author

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

Get-Help

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

Source Code

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

Related commands