Get-AzureRMAutomationJob
Gets Automation runbook jobs.
Warning
The AzureRM PowerShell module has been officially deprecated as of February 29, 2024. Users are advised to migrate from AzureRM to the Az PowerShell module to ensure continued support and updates.
Although the AzureRM module may still function, it's no longer maintained or supported, placing any continued use at the user's discretion and risk. Please refer to our migration resources for guidance on transitioning to the Az module.
Syntax
Get-AzureRMAutomationJob
[-Status <String>]
[-StartTime <DateTimeOffset>]
[-EndTime <DateTimeOffset>]
[-ResourceGroupName] <String>
[-AutomationAccountName] <String>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzureRMAutomationJob
-Id <Guid>
[-ResourceGroupName] <String>
[-AutomationAccountName] <String>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzureRMAutomationJob
-RunbookName <String>
[-Status <String>]
[-StartTime <DateTimeOffset>]
[-EndTime <DateTimeOffset>]
[-ResourceGroupName] <String>
[-AutomationAccountName] <String>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
The Get-AzureRmAutomationJob cmdlet gets runbook jobs in Azure Automation.
Examples
Example 1: Get a specific runbook job
PS C:\>Get-AzureRmAutomationJob -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-AzureRmAutomationJob -AutomationAccountName "Contoso17" -ResourceGroupName "ResourceGroup01" -RunbookName "Runbook02"
This command gets all jobs associated with a runbook named Runbook02.
Example 3: Get all running jobs
PS C:\>Get-AzureRmAutomationJob -AutomationAccountName "Contoso17" -ResourceGroupName "ResourceGroup01" -Status "Running"
This command gets all running jobs in the Automation account named Contoso17.
Parameters
-AutomationAccountName
Specifies the name of an Automation account for which this cmdlet gets jobs.
Type: | String |
Position: | 1 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Type: | IAzureContextContainer |
Aliases: | AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-EndTime
Specifies the end time for a job as a DateTimeOffset object. You can specify a string that can be converted to a valid DateTimeOffset. This cmdlet gets jobs that have an end time at or before the value that this parameter specifies.
Type: | Nullable<T>[DateTimeOffset] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Id
Specifies the ID of a job that this cmdlet gets.
Type: | Guid |
Aliases: | JobId |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-ResourceGroupName
Specifies the name of a resource group in which this cmdlet gets jobs.
Type: | String |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-RunbookName
Specifies the name of a runbook for which this cmdlet gets jobs.
Type: | String |
Aliases: | Name |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-StartTime
Specifies the start time of a job as a DateTimeOffset object. This cmdlet gets jobs that have a start time at or after the value that this parameter specifies.
Type: | Nullable<T>[DateTimeOffset] |
Position: | Named |
Default value: | None |
Required: | False |
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:
- Activating
- Completed
- Failed
- Queued
- Resuming
- Running
- Starting
- Stopped
- Stopping
- Suspended
- Suspending
Type: | String |
Accepted values: | Completed, Failed, Queued, Starting, Resuming, Running, Stopped, Stopping, Suspended, Suspending, Activating |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |