Get-AgentJobStep
Gets an JobStep object or collection of JobStep objects.
Syntax
Get-AgentJobStep [-job] <Job> [[-name] <String>] [<CommonParameters>]
Detailed Description
The Get-AgentJobStep function gets an JobStep object or a collection of JobStep objects for the specified Job.
Related Commands
Parameters
Name |
Description |
Required? |
Pipeline Input |
Default Value |
job |
|
true |
true (ByValue) |
|
name |
|
false |
false |
|
Input Type
None
You can pipe job Job to Get-AgentJobStep.
Return Values
Microsoft.SqlServer.Management.Smo.Agent.JobStep
Get-AgentJobStep returns a Microsoft.SqlServer.Management.Smo.Agent.JobStep object.
Examples
EXAMPLE 1
Get-AgentJob "Z002\sql2K8" | Get-AgentJobStep
This command gets a collection of JobStep objects for all jobs on SQL Server Z002\SQL2K8.