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-DbaAgentJobCategory makes it possible to retrieve the job categories.




Return all the job categories.

Get-DbaAgentJobCategory -SqlInstance sql1

Return all the job categories that have the name ‘Log Shipping’.

Get-DbaAgentJobCategory -SqlInstance sql1 -Category ‘Log Shipping’

Return all the job categories that have a type MultiServerJob.

Get-DbaAgentJobCategory -SqlInstance sstad-pc -CategoryType MultiServerJob


This command was created by Sander Stad. You can find Sander on Twitter and his blog.


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

Source Code

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

Related commands