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


Remove-DbaAgentJobCategory

Remove-DbaAgentJobCategory makes it possible to remove a job category.
Be assured that the category you want to remove is not used with other jobs. If another job uses this category it will get the category [Uncategorized (Local)].

Screenshots

dbatools-Remove-DbaAgentJobCategory

Examples

Remove the job category Category 1 from the instance.

Remove-DbaAgentJobCategory -SqlInstance sql1 -Category ‘Category 1’

Remove multiple job categories from the instance.

Remove-DbaAgentJobCategory -SqlInstance sql1 -Category Category1, Category2, Category3

Remove multiple job categories from the multiple instances

Remove-DbaAgentJobCategory -SqlInstance sql1, sql2, sql3 -Category Category1, Category2, Category3

Author

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

Get-Help

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

Source Code

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

Related commands