Remove-DbaAgentAlertCategory View Source Patrick Flynn (@sqllensman) Windows, Linux, macOS Synopsis Removes SQL Server Agent alert categories from SQL Server instances.
Description Removes custom alert categories from SQL Server Agent, useful for cleaning up unused organizational structures or standardizing alert management across environments.
Any existing alerts that reference the removed category will automatically be reassigned to the [Uncategorized] category, so you don’t need to manually update alert assignments before removal.
Remove-DbaAgentJob View Source Sander Stad (@sqlstad, sqlstad.nl) Windows, Linux, macOS Synopsis Removes SQL Server Agent jobs from one or more instances with options to preserve history and schedules.
Description Removes SQL Server Agent jobs from the target instances using the sp_delete_job system stored procedure. By default, both job history and unused schedules are deleted along with the job itself. You can optionally preserve job execution history for compliance or troubleshooting purposes, and keep unused schedules that might be reused for other jobs.
Remove-DbaAgentJobCategory View Source Sander Stad (@sqlstad, sqlstad.nl) Windows, Linux, macOS Synopsis Removes SQL Server Agent job categories from one or more instances.
Description Removes custom SQL Server Agent job categories that are no longer needed for job organization and management.
This is useful when cleaning up obsolete categories after reorganizing jobs or migrating workloads between environments.
Any jobs currently assigned to a removed category will automatically be reassigned to the default “[Uncategorized (Local)]” category.
Remove-DbaAgentJobStep View Source Sander Stad (@sqlstad), sqlstad.nl Windows, Linux, macOS Synopsis Removes specified job steps from SQL Server Agent jobs.
Description Removes individual job steps from SQL Server Agent jobs by step name. This function validates that both the job and step exist before attempting removal, preventing errors when cleaning up outdated or broken job steps. Useful for job maintenance tasks like removing obsolete backup steps, failed notification steps, or deprecated processes without affecting the rest of the job workflow.
Remove-DbaAgentOperator View Source Tracy Boggiano (@TracyBoggiano), databasesuperhero.com Windows, Linux, macOS Synopsis Removes SQL Server Agent operators from one or more instances.
Description Removes SQL Server Agent operators from specified instances, cleaning up notification contacts that are no longer needed.
Operators are notification contacts used by SQL Server Agent to send alerts about job failures, system issues, or other events. This function helps you remove outdated operator accounts when employees leave, contact information changes, or you need to consolidate notification lists.
Remove-DbaAgentProxy View Source Mikey Bronowski (@MikeyBronowski), bronowski.it Windows, Linux, macOS Synopsis Removes SQL Agent agent proxy(s).
Description Removes the SQL Agent proxy(s) that have passed through the pipeline.
If not used with a pipeline, Get-DbaAgentProxy will be executed with the parameters provided
and the returned SQL Agent proxy(s) will be removed.
Syntax Remove-DbaAgentProxy [-SqlInstance <DbaInstanceParameter[]>] [-SqlCredential <PSCredential>] [-Proxy <String[]>] [-ExcludeProxy <String[]>] [-WhatIf] [-Confirm] [<CommonParameters>] Remove-DbaAgentProxy [-SqlInstance <DbaInstanceParameter[]>] [-SqlCredential <PSCredential>] [-Proxy <String[]>] [-ExcludeProxy <String[]>] -InputObject <ProxyAccount[]> [-EnableException] [-WhatIf] [-Confirm] [<CommonParameters>] Examples Example: 1 PS C:\> Remove-DbaAgentProxy -SqlInstance localhost, localhost\namedinstance Removes all SQL Agent proxies on the localhost, localhost\namedinstance instances.
Remove-DbaAgentSchedule View Source Sander Stad (@sqlstad), sqlstad.nl Windows, Linux, macOS Synopsis Removes SQL Server Agent schedules from one or more instances.
Description Removes SQL Server Agent schedules from the msdb database, handling both unused schedules and those currently assigned to jobs. The function first removes schedule associations from any jobs using the schedule, then drops the schedule itself to prevent orphaned references. Use this when cleaning up unused schedules during maintenance, consolidating multiple schedules, or removing schedules as part of job reorganization.
Set-DbaAgentAlert View Source Garry Bargsley (@gbargsley), garrybargsley.com Windows, Linux, macOS Synopsis Modifies properties of existing SQL Agent alerts including enabled status and name.
Description Modifies existing SQL Agent alerts on one or more SQL Server instances, allowing you to enable, disable, or rename alerts without using SQL Server Management Studio. This function is particularly useful for bulk operations across multiple servers, standardizing alert configurations between environments, or temporarily disabling noisy alerts during maintenance windows.
Set-DbaAgentJob View Source Sander Stad (@sqlstad), sqlstad.nl Windows, Linux, macOS Synopsis Modifies existing SQL Server Agent job properties and notification settings.
Description Updates various properties of SQL Server Agent jobs including job name, description, owner, enabled/disabled status, notification settings, and schedule assignments. This function lets you modify jobs without using SQL Server Management Studio, making it useful for standardizing job configurations across multiple instances or automating job maintenance tasks. You can update individual jobs or perform bulk changes across multiple jobs and SQL Server instances simultaneously.
Set-DbaAgentJobCategory View Source Sander Stad (@sqlstad), sqlstad.nl Windows, Linux, macOS Synopsis Renames SQL Server Agent job categories to standardize naming conventions across instances.
Description Renames existing SQL Server Agent job categories by updating their names in the msdb database. This is particularly useful for standardizing job category naming conventions across multiple environments or correcting categories that were created with inconsistent names. The function validates that source categories exist and prevents renaming to names that already exist, helping maintain clean job organization within SQL Server Agent.