Copy-DbaAgentJob View Source Chrissy LeMaire (@cl), netnerds.net Windows, Linux, macOS Synopsis Migrates SQL Server Agent jobs between instances with dependency validation
Description Copies SQL Server Agent jobs from one instance to another while automatically validating all dependencies including databases, logins, proxy accounts, and operators. This eliminates the manual process of checking prerequisites before moving jobs during migrations, disaster recovery, or environment promotions.
The function intelligently skips jobs associated with maintenance plans and provides detailed validation messages for any missing dependencies.
Stephen Bennett, sqlnotesfromtheunderground.wordpress.com
Find-DbaAgentJob View Source Stephen Bennett, sqlnotesfromtheunderground.wordpress.com Windows, Linux, macOS Synopsis Searches and filters SQL Agent jobs across SQL Server instances using multiple criteria.
Description Searches SQL Agent jobs across one or more SQL Server instances using various filter criteria including job name, step name, execution status, schedule status, and notification settings. Helps DBAs identify problematic jobs that have failed, haven’t run recently, are disabled, lack schedules, or missing email notifications.
Get-DbaAgentJob View Source Garry Bargsley (@gbargsley), blog.garrybargsley.com Windows, Linux, macOS Synopsis Retrieves SQL Server Agent job details and execution status from one or more instances.
Description Retrieves detailed information about SQL Server Agent jobs including their configuration, status, schedules, and execution history. This function connects to SQL instances and queries the msdb database to return job properties like owner, category, last run outcome, and current execution status. Use this to monitor job health across your environment, audit job configurations before deployments, or identify jobs associated with specific databases for maintenance planning.
Get-DbaAgentJobCategory View Source Sander Stad (@sqlstad), sqlstad.nl Windows, Linux, macOS Synopsis Retrieves SQL Server Agent job categories with usage counts and filtering options
Description Returns SQL Server Agent job categories from one or more instances, showing how many jobs are assigned to each category. Job categories help organize and group related SQL Agent jobs for easier management and reporting. This function retrieves both built-in categories (like Database Maintenance, Log Shipping) and custom categories created by DBAs.
Get-DbaAgentJobHistory View Source Klaas Vandenberghe (@PowerDbaKlaas) , Simone Bizzotto (@niphold) Windows, Linux, macOS Synopsis Retrieves SQL Server Agent job execution history from msdb database for troubleshooting and compliance reporting.
Description Get-DbaAgentJobHistory queries the msdb database to retrieve detailed execution records for SQL Server Agent jobs, helping you troubleshoot failures, monitor performance trends, and generate compliance reports. This function accesses the same historical data you’d find in SQL Server Management Studio’s Job Activity Monitor, but with powerful filtering and output options.
Rob Sewell (sqldbawithabeard.com) | Simone Bizzotto (@niphlod)
Get-DbaAgentJobOutputFile View Source Rob Sewell (sqldbawithabeard.com) , Simone Bizzotto (@niphlod) Windows, Linux, macOS Synopsis Retrieves output file paths configured for SQL Agent job steps
Description This function returns the file paths where SQL Agent job steps write their output logs. When troubleshooting failed jobs or reviewing execution history, DBAs often need to locate these output files to examine detailed error messages and execution details. The function returns both the local file path and the UNC path for remote access, but only displays job steps that have an output file configured.
Get-DbaAgentJobStep View Source Klaas Vandenberghe (@PowerDbaKlaas), powerdba.eu Windows, Linux, macOS Synopsis Retrieves detailed SQL Agent job step information including execution status and configuration from SQL Server instances.
Description Collects comprehensive details about SQL Agent job steps across one or more SQL Server instances. Returns information about each step’s subsystem type, last execution date, outcome, and current state, which is essential for monitoring job performance and troubleshooting failed automation tasks. You can filter results by specific jobs, exclude disabled jobs, or process job objects from Get-DbaAgentJob to focus on particular maintenance routines or scheduled processes.
Get-DbaAgentServer View Source Claudio Silva (@claudioessilva), claudioessilva.eu Windows, Linux, macOS 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. The function provides a standardized view of Agent properties that would otherwise require connecting to each instance individually through SSMS.
Stephen Bennett, sqlnotesfromtheunderground.wordpress.com
Get-DbaRunningJob View Source Stephen Bennett, sqlnotesfromtheunderground.wordpress.com Windows, Linux, macOS 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.
New-DbaAgentJob View Source Sander Stad (@sqlstad), sqlstad.nl Windows, Linux, macOS 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).
The function also supports attaching existing schedules during job creation and can automatically create missing job categories when using -Force.