Thor Logo dbatools

Job

Get-DbaAgentServer

Claudio Silva (@claudioessilva), claudioessilva.eu

Get-DbaAgentServer View Source Claudio Silva (@claudioessilva), claudioessilva.eu Windows, Linux, macOS On this page: Synopsis · Description · Syntax · Examples · Parameters · Outputs Synopsis Retrieves SQL Server Agent service configuration and status information Description Returns detailed SQL Server Agent configuration including service state, logging levels, job history settings, and service accounts. This is essential for auditing Agent configurations across multiple instances, troubleshooting job failures, and documenting environment settings for compliance or migration planning.

Read more

Get-DbaRunningJob

Stephen Bennett, sqlnotesfromtheunderground.wordpress.com

Get-DbaRunningJob View Source Stephen Bennett, sqlnotesfromtheunderground.wordpress.com Windows, Linux, macOS On this page: Synopsis · Description · Syntax · Examples · Parameters · Outputs Synopsis Retrieves SQL Server Agent jobs that are currently executing Description This function returns SQL Server Agent jobs that are actively running at the moment you call it, filtering out any jobs in idle state. Use this to monitor job execution during maintenance windows, troubleshoot performance issues by identifying resource-consuming jobs, or verify that no jobs are running before performing maintenance operations.

Read more

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-DbaAgentJobCategory

Sander Stad (@sqlstad), sqlstad.nl

New-DbaAgentJobCategory View Source Sander Stad (@sqlstad), sqlstad.nl Windows, Linux, macOS On this page: Synopsis · Description · Syntax · Examples · Parameters · Outputs Synopsis Creates new SQL Server Agent job categories for organizing and managing jobs. Description Creates custom job categories in SQL Server Agent to help organize and classify jobs by function, department, or priority level. Job categories provide a way to group related jobs together for easier management and reporting, replacing the need to manually create categories through SQL Server Management Studio.

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-DbaAgentJob

Sander Stad (@sqlstad, sqlstad.nl)

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

Read more

Remove-DbaAgentJobCategory

Sander Stad (@sqlstad, sqlstad.nl)

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

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

Remove-DbaAgentSchedule

Sander Stad (@sqlstad), sqlstad.nl

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

Read more
Page 2 of 3