< Back

Get-AzureRmAutomationJob

Tue Jan 29, 2019 9:32 pm

NAME Get-AzureRmAutomationJob



SYNOPSIS

Gets Automation runbook jobs.





SYNTAX

Get-AzureRmAutomationJob [-ResourceGroupName] <String> [-AutomationAccountName] <String> [-DefaultProfile <IAzureContextContainer>] [-EndTime

<DateTimeOffset>] [-StartTime <DateTimeOffset>] [-Status {Completed | Failed | Queued | Starting | Resuming | Running | Stopped | Stopping |

Suspended | Suspending | Activating}] [<CommonParameters>]



Get-AzureRmAutomationJob [-ResourceGroupName] <String> [-AutomationAccountName] <String> [-DefaultProfile <IAzureContextContainer>] [-EndTime

<DateTimeOffset>] -RunbookName <String> [-StartTime <DateTimeOffset>] [-Status {Completed | Failed | Queued | Starting | Resuming | Running |

Stopped | Stopping | Suspended | Suspending | Activating}] [<CommonParameters>]



Get-AzureRmAutomationJob [-ResourceGroupName] <String> [-AutomationAccountName] <String> [-DefaultProfile <IAzureContextContainer>] -Id <Guid>

[<CommonParameters>]





DESCRIPTION

The Get-AzureRmAutomationJob cmdlet gets runbook jobs in Azure Automation.





PARAMETERS

-AutomationAccountName <String>

Specifies the name of an Automation account for which this cmdlet gets jobs.



Required? true

Position? 1

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-DefaultProfile <IAzureContextContainer>

The credentials, account, tenant, and subscription used for communication with azure



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-EndTime <DateTimeOffset>

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.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Id <Guid>

Specifies the ID of a job that this cmdlet gets.



Required? true

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-ResourceGroupName <String>

Specifies the name of a resource group in which this cmdlet gets jobs.



Required? true

Position? 0

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-RunbookName <String>

Specifies the name of a runbook for which this cmdlet gets jobs.



Required? true

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-StartTime <DateTimeOffset>

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.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Status <String>

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



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

None

This cmdlet does not accept any input.





OUTPUTS

Microsoft.Azure.Commands.Automation.Model.Job







NOTES









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.







RELATED LINKS

Online Version: https://docs.microsoft.com/en-us/powers ... omationjob

Get-AzureRmAutomationJobOutput

Resume-AzureRmAutomationJob

Stop-AzureRmAutomationJob

Suspend-AzureRmAutomationJob