dbatools is a free PowerShell module with over 300 SQL Server administration, best practice and migration commands included.

Please note that documentation and command names may be out of date while we work furiously towards 1.0


Get-DbaAgentJobStep

The Get-DbaAgentJobStep returns connected SMO object for SQL Agent Job Step for each instance(s) of SQL Server.

Screenshots

dbatools-Get-DbaAgentJobStep

Examples

Returns all SQL Agent Job Steps on the local default SQL Server instance.

Get-DbaAgentJobStep -SqlInstance localhost

Returns all SQL Agent Job Steps for the local and sql2016 SQL Server instances.

Get-DbaAgentJobStep -SqlInstance localhost, sql2016

Returns all SQL Agent Job Steps for the jobs named BackupData and BackupDiff from the local SQL Server instance.

Get-DbaAgentJobStep -SqlInstance localhost -Job BackupData, BackupDiff

Returns all SQL Agent Job Steps for the local SQL Server instances, except for the BackupDiff Job.

Get-DbaAgentJobStep -SqlInstance localhost -ExcludeJob BackupDiff

Returns all SQL Agent Job Steps for the local SQL Server instances, excluding the disabled jobs.

Get-DbaAgentJobStep -SqlInstance localhost -NoDisabledJobs

Find all of your Job Steps from servers in the $server collection.

$servers | Get-DbaAgentJobStep

Author

This command was created by Klaas Vandenberghe. You can find Klaas on Twitter.

Get-Help

From PowerShell, execute Get-Help Get-DbaAgentJobStep -Detailed for more information on this function.

Source Code

Want to see the source code? View Get-DbaAgentJobStep.ps1 on GitHub
 

Related commands