Thor Logo dbatools

Agent

New-DbaAgentSchedule

Sander Stad (@sqlstad), sqlstad.nl

New-DbaAgentSchedule View Source Sander Stad (@sqlstad), sqlstad.nl Windows, Linux, macOS Synopsis Creates a new SQL Server Agent schedule for automated job execution Description Creates a new schedule in the msdb database that defines when SQL Server Agent jobs should execute. Schedules can be created as standalone objects or immediately attached to existing jobs, allowing you to standardize timing across multiple jobs without recreating the same schedule repeatedly. This replaces the need to manually create schedules through SQL Server Management Studio or T-SQL, while providing comprehensive validation of schedule parameters and frequency options.

Read more

Remove-DbaAgentAlert

Mikey Bronowski (@MikeyBronowski), bronowski.it

Remove-DbaAgentAlert View Source Mikey Bronowski (@MikeyBronowski), bronowski.it Windows, Linux, macOS Synopsis Removes SQL Server Agent alerts from specified instances. Description Deletes SQL Server Agent alerts that monitor for specific errors, performance conditions, or system events. Useful for cleaning up obsolete alerts, removing test configurations, or managing alert policies across multiple instances. Can remove specific alerts by name, exclude certain alerts, or work with piped input from Get-DbaAgentAlert for selective removal.

Read more

Remove-DbaAgentAlertCategory

Patrick Flynn (@sqllensman)

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.

Read more

Remove-DbaAgentJob

Sander Stad (@sqlstad, sqlstad.nl)

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.

Read more

Remove-DbaAgentJobCategory

Sander Stad (@sqlstad, sqlstad.nl)

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.

Read more

Remove-DbaAgentJobStep

Sander Stad (@sqlstad), sqlstad.nl

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.

Read more

Remove-DbaAgentOperator

Tracy Boggiano (@TracyBoggiano), databasesuperhero.com

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.

Read more

Remove-DbaAgentProxy

Mikey Bronowski (@MikeyBronowski), bronowski.it

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.

Read more

Remove-DbaAgentSchedule

Sander Stad (@sqlstad), sqlstad.nl

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.

Read more

Set-DbaAgentAlert

Garry Bargsley (@gbargsley), garrybargsley.com

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.

Read more
Page 4 of 6