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


Gets SQL Agent Job Category information for each instance(s) of SQL Server.



To return all SQL Agent Job Categories on the local default SQL Server instance.

Get-DbaJobCategory -SqlInstance localhost

To return all SQL Agent Job Categories for the local and sql2016 SQL Server instances.

Get-DbaJobCategory -SqlInstance localhost, sql2016


This command was created by Garry Bargsley. You can find Garry on Twitter and his blog.


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

Source Code

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

Related commands