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


Start-DbaXESession

This script starts Extended Events sessions on a SQL Server instance.

Screenshots

dbatools-Start-DbaXeSession

Examples

Starts all Extended Event Session on the sqlserver2012 instance.

Start-DbaXESession -SqlInstance sqlserver2012 -AllSessions

Starts the xesession1 and xesession2 Extended Event sessions.

Start-DbaXESession -SqlInstance sqlserver2012 -Session xesession1,xesession2

Starts the sessions returned from the Get-DbaXESession function.

Get-DbaXESession -SqlInstance sqlserver2012 -Session xesession1 | Start-DbaXESession

Author

This command was created by Doug Meyers.

Get-Help

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

Source Code

Want to see the source code? View Start-DbaXESession.ps1 on GitHub
 

Related commands