Skip to content

Latest commit

 

History

History
206 lines (154 loc) · 4.26 KB

Get-AzureAutomationJob.md

File metadata and controls

206 lines (154 loc) · 4.26 KB
external help file ms.assetid online version schema
Microsoft.Azure.Commands.Automation.dll-Help.xml
6527FF45-9C16-47E8-8E70-619A0581D2F8
2.0.0

Get-AzureAutomationJob

SYNOPSIS

Gets one or more Azure Automation runbook jobs.

[!INCLUDE rdfe-banner]

SYNTAX

ByAll (Default)

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

ByJobId

Get-AzureAutomationJob -Id <Guid> -AutomationAccountName <String> [-Profile <AzureSMProfile>]
 [<CommonParameters>]

ByRunbookName

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

DESCRIPTION

[!INCLUDE aa-deprecation]

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.

PARAMETERS

-AutomationAccountName

Specifies the name of an Azure Automation account.

Type: String
Parameter Sets: (All)
Aliases: 

Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-EndTime

Specifies the end time for a job.

Type: DateTimeOffset
Parameter Sets: ByAll, ByRunbookName
Aliases: 

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

-Id

Specifies the ID of a job.

Type: Guid
Parameter Sets: ByJobId
Aliases: JobId

Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
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
Parameter Sets: (All)
Aliases: 

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

-RunbookName

Specifies the name of a runbook.

Type: String
Parameter Sets: ByRunbookName
Aliases: Name

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-StartTime

Specifies the start time of a job.

Type: DateTimeOffset
Parameter Sets: ByAll, ByRunbookName
Aliases: 

Required: False
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
Parameter Sets: ByAll, ByRunbookName
Aliases: 

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

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (https://go.microsoft.com/fwlink/?LinkID=113216).

INPUTS

OUTPUTS

Microsoft.Azure.Commands.Automation.Model.Job

NOTES

RELATED LINKS

Resume-AzureAutomationJob

Stop-AzureAutomationJob

Suspend-AzureAutomationJob