Thor Logo dbatools

JobStep

New-DbaAgentJob

Sander Stad (@sqlstad), sqlstad.nl

New-DbaAgentJob View Source Sander Stad (@sqlstad), sqlstad.nl Windows, Linux, macOS On this page: Synopsis · Description · Syntax · Examples · Parameters · Outputs Synopsis Creates SQL Server Agent jobs with notification settings and schedule assignments Description Creates SQL Server Agent jobs with full configuration options including owner assignment, job categories, and comprehensive notification settings. You can configure email, event log, pager, and netsend notifications with specific operators and trigger conditions (success, failure, completion).

Read more

New-DbaAgentJobStep

Sander Stad (@sqlstad), sqlstad.nl

New-DbaAgentJobStep View Source Sander Stad (@sqlstad), sqlstad.nl Windows, Linux, macOS On this page: Synopsis · Description · Syntax · Examples · Parameters · Outputs Synopsis Creates a new step within an existing SQL Server Agent job with configurable execution options and flow control Description Creates individual job steps within SQL Server Agent jobs, allowing you to build complex automation workflows without manually configuring each step through SSMS. Each step can execute different types of commands (T-SQL, PowerShell, SSIS packages, OS commands) and includes retry logic, success/failure branching, and output capture.

Read more

New-DbaAgentSchedule

Sander Stad (@sqlstad), sqlstad.nl

New-DbaAgentSchedule View Source Sander Stad (@sqlstad), sqlstad.nl Windows, Linux, macOS On this page: Synopsis · Description · Syntax · Examples · Parameters · Outputs 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.

Read more

Remove-DbaAgentJobStep

Sander Stad (@sqlstad), sqlstad.nl

Remove-DbaAgentJobStep View Source Sander Stad (@sqlstad), sqlstad.nl Windows, Linux, macOS On this page: Synopsis · Description · Syntax · Examples · Parameters · Outputs 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.

Read more

Set-DbaAgentJobStep

Sander Stad (@sqlstad), sqlstad.nl

Set-DbaAgentJobStep View Source Sander Stad (@sqlstad), sqlstad.nl Windows, Linux, macOS On this page: Synopsis · Description · Syntax · Examples · Parameters · Outputs Synopsis Modifies properties of existing SQL Agent job steps or creates new ones with Force parameter. Description Modifies SQL Agent job step properties including commands, subsystems, retry logic, success/failure actions, and execution context. Updates existing job steps by name or creates new steps when using the -Force parameter, eliminating the need to manually edit job steps through SSMS.

Read more

Set-DbaAgentSchedule

Sander Stad (@sqlstad, sqlstad.nl)

Set-DbaAgentSchedule View Source Sander Stad (@sqlstad, sqlstad.nl) Windows, Linux, macOS On this page: Synopsis · Description · Syntax · Examples · Parameters · Outputs Synopsis Modifies properties of existing SQL Agent job schedules Description Modifies the timing, frequency, and other properties of existing SQL Agent job schedules without recreating them. You can update schedule frequency (daily, weekly, monthly), change start/end times and dates, enable or disable schedules, and rename them.

Read more