Author | Chrissy LeMaire (@cl), netnerds.net |
Availability | Windows, Linux, macOS |
Want to see the source code for this command? Check out Export-DbaPfDataCollectorSetTemplate on GitHub.
Want to see the Bill Of Health for this command? Check out Export-DbaPfDataCollectorSetTemplate.
Exports a new Data Collector Set XML Template.
Exports a Data Collector Set XML Template from Get-DbaPfDataCollectorSet. Exports to "$home\Documents\Performance Monitor Templates" by default.
Export-DbaPfDataCollectorSetTemplate
[[-ComputerName] <DbaInstanceParameter[]>]
[[-Credential] <PSCredential>]
[[-CollectorSet] <String[]>]
[[-Path] <String>]
[[-FilePath] <String>]
[[-InputObject] <Object[]>]
[-EnableException]
[<CommonParameters>]
PS C:\> Export-DbaPfDataCollectorSetTemplate -ComputerName sql2017 -Path C:\temp\pf
Exports all data collector sets from to the C:\temp\pf folder.
PS C:\> Get-DbaPfDataCollectorSet ComputerName sql2017 -CollectorSet 'System Correlation' | Export-DbaPfDataCollectorSetTemplate -Path C:\temp
Exports the 'System Correlation' data collector set from sql2017 to C:\temp.
The target computer. Defaults to localhost.
Alias | |
Required | False |
Pipeline | false |
Default Value | $env:COMPUTERNAME |
Allows you to login to $ComputerName using alternative credentials. To use:
$cred = Get-Credential, then pass $cred object to the -Credential parameter.
Alias | |
Required | False |
Pipeline | false |
Default Value |
The name of the collector set(s) to export.
Alias | DataCollectorSet |
Required | False |
Pipeline | false |
Default Value |
Specifies the directory where the file or files will be exported.
Alias | |
Required | False |
Pipeline | false |
Default Value | (Get-DbatoolsConfigValue -FullName 'Path.DbatoolsExport') |
Specifies the full file path of the output file.
Alias | OutFile,FileName |
Required | False |
Pipeline | false |
Default Value |
Accepts the object output by Get-DbaPfDataCollectorSetTemplate via the pipeline.
Alias | |
Required | False |
Pipeline | true (ByValue) |
Default Value |
By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message.
This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting.
Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.
Alias | |
Required | False |
Pipeline | false |
Default Value | False |