Get-​Azure​Sql​Job

Gets one or multiple job definitions.

Syntax

Get-AzureSqlJob
   [[-AzureSqlJobConnection] <AzureSqlJobConnection>]
   -JobName <String[]>
   [<CommonParameters>]
Get-AzureSqlJob
   [[-AzureSqlJobConnection] <AzureSqlJobConnection>]
   [-ScheduleName <String>]
   [<CommonParameters>]

Description

The Get-AzureSqlJob cmdlet gets one or multiple job definitions.

Examples

Example 1: Get a specified job by name

PS C:\>Get-AzureSqlJob -JobName MyJob
JobName              : MyJob
ContentName          : MyScript
ContentVersionNumber :
TargetDescription    : {"CustomCollectionName":"myCustomCollection"}
TargetId             : b525727e-6ed0-44cc-94da-63c543e383d7
CredentialName       : MyCredential
ExecutionPolicyName  : Default execution policy
ResultSetDestination :

This command gets the specified job by name.

Example 2: Get all jobs that have defined triggers over the provided schedule

PS C:\>Get-AzureSqlJob -ScheduleName MyOneMinuteIntervalSchedule
JobName              : MyJob
ContentName          : MyScript
ContentVersionNumber :
TargetDescription    : {"CustomCollectionName":"myCustomCollection"}
TargetId             : b525727e-6ed0-44cc-94da-63c543e383d7
CredentialName       : MyCredential
ExecutionPolicyName  : Default execution policy
ResultSetDestination :

This command gets all jobs that have defined triggers over the provided schedule.

Example 3: Get all jobs defined in the system

PS C:\>Get-AzureSqlJob
JobName              : System Job: telemetry
ContentName          :
ContentVersionNumber :
TargetDescription    :
TargetId             :
CredentialName       :
ExecutionPolicyName  : System execution policy: telemetry
ResultSetDestination :

JobName              : System Job: heartbeat
ContentName          :
ContentVersionNumber :
TargetDescription    :
TargetId             :
CredentialName       :
ExecutionPolicyName  : System execution policy: heartbeat
ResultSetDestination :

JobName              : System Job: cleanup
ContentName          :
ContentVersionNumber :
TargetDescription    :
TargetId             :
CredentialName       :
ExecutionPolicyName  : System execution policy: cleanup
ResultSetDestination :

JobName              : MyJob
ContentName          : MyScript
ContentVersionNumber :
TargetDescription    : {"CustomCollectionName":"myCustomCollection"}
TargetId             : b525727e-6ed0-44cc-94da-63c543e383d7
CredentialName       : MyCredential
ExecutionPolicyName  : Default execution policy
ResultSetDestination :

JobName              : MyResultsJob
ContentName          : MyScript
ContentVersionNumber :
TargetDescription    : {"CustomCollectionName":"myCustomCollection"}
TargetId             : b525727e-6ed0-44cc-94da-63c543e383d7
CredentialName       : MyCredential
ExecutionPolicyName  : Default execution policy
ResultSetDestination : Microsoft.Azure.SqlDatabase.Jobs.Client.ResultSetDestination

JobName              : MyResultsJobAcrossShardMap
ContentName          : MyScript
ContentVersionNumber :
TargetDescription    : {"ShardMapName":"myShardMap","ShardMapManagerServerName":"myShardMapManagerServer.database.windows.net","ShardMapManagerDatabaseName":
                       "myShardMapManagerDatabase"}
TargetId             : 1afd9326-1277-4344-832f-8170d0375ff7
CredentialName       : MyCredential
ExecutionPolicyName  : Default execution policy
ResultSetDestination : Microsoft.Azure.SqlDatabase.Jobs.Client.ResultSetDestination

This command gets all jobs defined in the system.

Required Parameters

-JobName

Specifies the name of the job.

Type:String[]
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Optional Parameters

-AzureSqlJobConnection

Specifies the connection state object for the job. You can get the connection state object through the New-AzureSqlJobConnection cmdlet. If you do not specify this parameter, the connection state is used from a prior call to the Use-AzureSqlJobConnection cmdlet.

Type:AzureSqlJobConnection
Position:1
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ScheduleName

Specifies the name of the schedule as a filter when getting jobs.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False