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