Get-AzureAutomationJob
Gets one or more Azure Automation runbook jobs.
Note
The cmdlets referenced in this documentation are for managing legacy Azure resources that use Azure Service Manager (ASM) APIs. This legacy PowerShell module isn't recommended when creating new resources since ASM is scheduled for retirement. For more information, see Azure Service Manager retirement.
The Az PowerShell module is the recommended PowerShell module for managing Azure Resource Manager (ARM) resources with PowerShell.
Syntax
ByAll (Default)
Get-AzureAutomationJob
-AutomationAccountName <String>
[-Status <String>]
[-StartTime <DateTimeOffset>]
[-EndTime <DateTimeOffset>]
[-Profile <AzureSMProfile>]
[<CommonParameters>]
ByJobId
Get-AzureAutomationJob
-Id <Guid>
-AutomationAccountName <String>
[-Profile <AzureSMProfile>]
[<CommonParameters>]
ByRunbookName
Get-AzureAutomationJob
-RunbookName <String>
-AutomationAccountName <String>
[-Status <String>]
[-StartTime <DateTimeOffset>]
[-EndTime <DateTimeOffset>]
[-Profile <AzureSMProfile>]
[<CommonParameters>]
Description
Important
This PowerShell command for Azure Automation is longer supported as of 01/23/2020. The Azure Service Management model is deprecated for Azure Automation and was disabled on that date. Please use the commands which support the Azure Resource Management model in Az.Automation.
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.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | True |
Value from remaining arguments: | False |
-EndTime
Specifies the end time for a job.
Parameter properties
Type: | DateTimeOffset |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
ByAll
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
ByRunbookName
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-Id
Specifies the ID of a job.
Parameter properties
Type: | Guid |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Aliases: | JobId |
Parameter sets
ByJobId
Position: | Named |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | True |
Value from remaining arguments: | 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.
Parameter properties
Type: | AzureSMProfile |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-RunbookName
Specifies the name of a runbook.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Aliases: | Name |
Parameter sets
ByRunbookName
Position: | Named |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-StartTime
Specifies the start time of a job.
Parameter properties
Type: | DateTimeOffset |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
ByAll
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
ByRunbookName
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | 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
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
ByAll
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
ByRunbookName
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.