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


Stop-DbaXESession

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

Screenshots

dbatools-Stop-DbaXESession

Examples

Stops all Extended Event Session on the sqlserver2012 instance.

Stop-DbaXESession -SqlInstance sqlserver2012 -AllSessions

Stops the xesession1 and xesession2 Extended Event sessions.

Stop-DbaXESession -SqlInstance sqlserver2012 -Session xesession1,xesession2

Stops the sessions returned from the Get-DbaXESession function.

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

Author

This command was created by Doug Meyers.

Get-Help

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

Source Code

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

Related commands