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


Get-DbaWaitingTask

This command is based on waiting task T-SQL script published by Paul Randal.

Reference

Screenshots

dbatools-Get-DbaWaitingTasks

Examples

Returns the waiting task for all sessions on sqlserver2014a

Get-DbaWaitingTask -SqlInstance sqlserver2014a

Returns the waiting task for all sessions (user and system) on sqlserver2014a

Get-DbaWaitingTask -SqlInstance sqlserver2014a -IncludeSystemSpid

Author

This command was created by Shawn Melton. You can find Shawn on Twitter and his blog.

Get-Help

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

Source Code

Want to see the source code? View Get-DbaWaitingTask.ps1 on GitHub
 

Related commands