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-DbaTrace

This command stops a trace on a SQL Server Instance.

Screenshots

dbatools-Stop-DbaTrace

Examples

Stops all traces on sql2008.

Stop-DbaTrace -SqlInstance sql2008

Stops all trace with ID 1 on sql2008.

Stop-DbaTrace -SqlInstance sql2008 -Id 1

Stops selected traces on sql2008.

Get-DbaTrace -SqlInstance sql2008 | Out-GridView -PassThru | Stop-DbaTrace

Author

This command was created by Chrissy LeMaire. You can find Chrissy on Twitter.

Get-Help

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

Source Code

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

Related commands