dbatools is a free PowerShell module with over 200 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


Remove-DbaAgentJobStep

Remove-DbaAgentJobStep removes a job step in the SQL Server Agent.

Screenshots

dbatools-Remove-DbaAgentJobStep

Examples

Remove the job step from the job.

Remove-DbaAgentJobStep -SqlInstance sql1 -Job Job1 -StepName Step1

Remove the job step from the job for multiple jobs.

Remove-DbaAgentJobStep -SqlInstance sql1 -Job Job1, Job2, Job3 -StepName Step1

Remove the job step from the job on multiple servers.

Remove-DbaAgentJobStep -SqlInstance sql1, sql2, sql3 -Job Job1 -StepName Step1

Remove the job step from the job on multiple servers using pipeline.

sql1, sql2, sql3 | Remove-DbaAgentJobStep -Job Job1 -StepName Step1

Author

This command was created by Sander Stad. You can find Sander on Twitter and his blog.

Get-Help

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

Source Code

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

Related commands