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


Export-DbaPfDataCollectorSetTemplate

Exports a Data Collector Set XML Template from Get-DbaPfDataCollectorSet. Exports to “$home\Documents\Performance Monitor Templates” by default.

Screenshots

dbatools-Export-DbaPfDataCollectorSetTemplate

Examples

Exports all data collector sets from to the C:\temp\pf folder.

Export-DbaPfDataCollectorSetTemplate -ComputerName sql2017 -Path C:\temp\pf

Exports the ‘System Correlation’ data collector set from sql2017 to C:\temp.

Get-DbaPfDataCollectorSet ComputerName sql2017 -CollectorSet ‘System Correlation’ | Export-DbaPfDataCollectorSetTemplate -Path C:\temp

Author

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

Get-Help

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

Source Code

Want to see the source code? View Export-DbaPfDataCollectorSetTemplate.ps1 on GitHub
 

Related commands