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


New-DbaAgentJobCategory

New-DbaAgentJobCategory makes it possible to create a job category that can be used with jobs.
It returns an array of the job(s) created.

Screenshots

dbatools-New-DbaAgentJobCategory

Examples

Creates a new job category with the name ‘Category 1’.

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

Creates a new job category with the name ‘Category 2’ and assign the category type for a multi server job.

New-DbaAgentJobCategory -SqlInstance sql1 -Category ‘Category 2’ -CategoryType MultiServerJob

Author

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

Get-Help

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

Source Code

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

Related commands