Get-​Azure​Automation​Job

Gets one or more Azure Automation runbook jobs.

Syntax

Get-AzureAutomationJob
   -AutomationAccountName <String>
   [-EndTime <DateTimeOffset>]
   [-Profile <AzureSMProfile>]
   [-StartTime <DateTimeOffset>]
   [-Status <String>]
   [<CommonParameters>]
Get-AzureAutomationJob
   -AutomationAccountName <String>
   [-EndTime <DateTimeOffset>]
   [-Profile <AzureSMProfile>]
   -RunbookName <String>
   [-StartTime <DateTimeOffset>]
   [-Status <String>]
   [<CommonParameters>]
Get-AzureAutomationJob
   -AutomationAccountName <String>
   -Id <Guid>
   [-Profile <AzureSMProfile>]
   [<CommonParameters>]

Description

The Get-AzureAutomationJob cmdlet gets one or more runbook jobs in Microsoft Azure Automation.

Examples

Example 1: Get a specific runbook job

PS C:\> Get-AzureAutomationJob -AutomationAccountName "Contoso17" -Id 2989b069-24fe-40b9-b3bd-cb7e5eac4b647

This command gets the job that has the specified GUID.

Example 2: Get all jobs for a runbook

PS C:\> Get-AzureAutomationJob -AutomationAccountName "Contoso17" -RunbookName "MyRunbook"

This command gets all jobs associated with a runbook named MyRunbook.

Example 2: Get all running jobs

PS C:\> Get-AzureAutomationJob -AutomationAccountName "Contoso17" -Status "Running"

This command gets all running jobs in the automation account with the name Contoso17.

Required Parameters

-AutomationAccountName

Specifies the name of an Azure Automation account.

Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-Id

Specifies the ID of a job.

Type:Guid
Aliases:JobId
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-RunbookName

Specifies the name of a runbook.

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

Optional Parameters

-EndTime

Specifies the end time for a job.

Type:DateTimeOffset
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Profile

Specifies the Azure profile from which this cmdlet reads. If you do not specify a profile, this cmdlet reads from the local default profile.

Type:AzureSMProfile
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-StartTime

Specifies the start time of a job.

Type:DateTimeOffset
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Status

Specifies the status of a job. This cmdlet gets jobs that have a status matching this parameter. Valid values are: - Completed

  • Failed
  • Queued
  • Starting
  • Resuming
  • Running
  • Stopped
  • Stopping
  • Suspended
  • Suspending
  • Activating
Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Outputs

Microsoft.Azure.Commands.Automation.Model.Job