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


Set-DbaAgentJobCategory makes it possible to change a job category.




Change the name of the category from ‘Category 1’ to ‘Category 2’.

Set-DbaAgentJobCategory -SqlInstance sql1 -Category ‘Category 1’ -NewName ‘Category 2’

Rename multiple jobs in one go on multiple servers

Set-DbaAgentJobCategory -SqlInstance sql1, sql2 -Category Category1, Category2 -NewName cat1, cat2


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


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

Source Code

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

Related commands