commands

^

Copy-DbaXESessionTemplate

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

 

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

Synopsis

Copies non-Microsoft templates from the dbatools template repository (/bin/XEtemplates/) to $home\Documents\SQL Server Management Studio\Templates\XEventTemplates.

Description

Copies non-Microsoft templates from the dbatools template repository (/bin/XEtemplates/) to $home\Documents\SQL Server Management Studio\Templates\XEventTemplates.

Useful for when you want to use the SSMS GUI.

Syntax

Copy-DbaXESessionTemplate
    [[-Path] <String[]>]
    [[-Destination] <String>]
    [-EnableException]
    [<CommonParameters>]

 

Examples

 

Example: 1
PS C:\> Copy-DbaXESessionTemplate

Copies non-Microsoft templates from the dbatools template repository (/bin/XEtemplates/) to $home\Documents\SQL Server Management Studio\Templates\XEventTemplates.

Example: 2
PS C:\> Copy-DbaXESessionTemplate -Path C:\temp\XEtemplates

Copies your templates from C:\temp\XEtemplates to $home\Documents\SQL Server Management Studio\Templates\XEventTemplates.

Optional Parameters

-Path

The path to the template directory. Defaults to the dbatools template repository (/bin/XEtemplates/).

Alias
Required False
Pipeline false
Default Value "$script:PSModuleRoot\bin\XEtemplates"
-Destination

Path to the Destination directory, defaults to $home\Documents\SQL Server Management Studio\Templates\XEventTemplates.

Alias
Required False
Pipeline false
Default Value "$home\Documents\SQL Server Management Studio\Templates\XEventTemplates"
-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