< Back

Start-AzureRmAutomationRunbook

Tue Jan 29, 2019 9:33 pm

NAME Start-AzureRmAutomationRunbook



SYNOPSIS

Starts a runbook job.





SYNTAX

Start-AzureRmAutomationRunbook [-ResourceGroupName] <String> [-AutomationAccountName] <String> [-Name] <String> [-DefaultProfile

<IAzureContextContainer>] [-MaxWaitSeconds <Int32>] [-Parameters <IDictionary>] [-RunOn <String>] [-Wait] [<CommonParameters>]





DESCRIPTION

The Start-AzureRmAutomationRunbook cmdlet starts an Azure Automation runbook job. Specify the ID or name of a runbook.





PARAMETERS

-AutomationAccountName <String>





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



-MaxWaitSeconds <Int32>

Specifies the number of seconds this cmdlet waits for a job to finish before it abandons the job. The default value is 10800, or three hours.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Name <String>





Required? true

Position? 2

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-Parameters <IDictionary>





Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-ResourceGroupName <String>





Required? true

Position? 0

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-RunOn <String>

Specifies which Hybrid Worker Group on which to run the runbook.



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-Wait [<SwitchParameter>]

Indicates that this cmdlet waits for job to complete, suspend, or fail, and then returns control to Azure PowerShell.



Required? false

Position? named

Default value False

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

This cmdlet returns a Job object, unless you specify the Wait parameter.



If you do not specify Wait , Azure PowerShell returns a Job object immediately. If you specify Wait , Azure PowerShell completes the job, and

then returns the result. The result is not a Job object.





NOTES









Example 1: Start a runbook job



PS C:\\>Start-AzureRmAutomationRunbook -AutomationAccountName "Contoso17" -Name "Runbk01" -ResourceGroupName "ResourceGroup01"



This command starts a runbook job for the runbook named Runbk01 in the Azure Automation account named Contoso17.





Example 2: Start a runbook job and wait for results



Start-AzureRmAutomationRunbook -AutomationAccountName "Contoso17" -Name "Runbk01" -ResourceGroupName "ResourceGroup01" -MaxWaitSeconds 1000 -Wait



This command starts a runbook job for the runbook named Runbk01 in the Azure Automation account named Contoso17. This command specifies the Wait

parameter. Therefore, it returns results after the job is completed. The cmdlet waits up to 1000 seconds for the results.







RELATED LINKS

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

Export-AzureRmAutomationRunbook

Get-AzureRmAutomationRunbook

Import-AzureRmAutomationRunbook

New-AzureRmAutomationRunbook

New-AzureRmAutomationRunbook

Publish-AzureRmAutomationRunbook

Remove-AzureRmAutomationRunbook

Set-AzureRmAutomationRunbook