commands

^

Get-DbaPfDataCollectorSetTemplate

Author Chrissy LeMaire (@cl), netnerds.net
Availability Windows only

 

Synopsis

Parses Perf Monitor templates. Defaults to parsing templates in the dbatools template repository (\bin\perfmontemplates).

Description

Parses Perf Monitor XML templates. Defaults to parsing templates in the dbatools template repository (\bin\perfmontemplates).

Syntax

Get-DbaPfDataCollectorSetTemplate
    [[-Path] <String[]>]
    [[-Pattern] <String>]
    [[-Template] <String[]>]
    [-EnableException]
    [<CommonParameters>]

 

Examples

 

Example: 1
PS C:\> Get-DbaPfDataCollectorSetTemplate

Returns information about all the templates in the local dbatools repository.

Example: 2
PS C:\> Get-DbaPfDataCollectorSetTemplate | Out-GridView -PassThru | Import-DbaPfDataCollectorSetTemplate -ComputerName sql2017 | Start-DbaPfDataCollectorSet

Allows you to select a template, then deploys it to sql2017 and immediately starts the DataCollectorSet.

Example: 3
PS C:\> Get-DbaPfDataCollectorSetTemplate | Select-Object *

Returns more information about the template, including the full path/filename.

Optional Parameters

-Path

The path to the template directory. Defaults to the dbatools template repository (\bin\perfmontemplates).

Alias
Required False
Pipeline false
Default Value "$script:PSModuleRoot\bin\perfmontemplates\collectorsets"
-Pattern

Specify a pattern for filtering. Alternatively, you can use Out-GridView -Passthru to select objects and pipe them to Import-DbaPfDataCollectorSetTemplate.

Alias
Required False
Pipeline false
Default Value
-Template

Specifies one or more of the templates provided by dbatools. Press tab to cycle through the list to the options.

Alias
Required False
Pipeline false
Default Value
-EnableException

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

 

Want to see the source code for this command? Check out Get-DbaPfDataCollectorSetTemplate on GitHub.
Want to see the Bill Of Health for this command? Check out Get-DbaPfDataCollectorSetTemplate.