Register-AzAutomationScheduledRunbook
Associates a runbook to a schedule.
Syntax
ByRunbookName (Default)
Register-AzAutomationScheduledRunbook
[-ResourceGroupName] <String>
[-AutomationAccountName] <String>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
ByRunbookNameAndScheduleName
Register-AzAutomationScheduledRunbook
[-ResourceGroupName] <String>
[-AutomationAccountName] <String>
-RunbookName <String>
-ScheduleName <String>
[-Parameters <IDictionary>]
[-RunOn <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
The Register-AzAutomationScheduledRunbook cmdlet associates an Azure Automation runbook to a schedule.
The runbook starts based on the schedule you specify using the ScheduleName parameter.
Examples
Example 1: Associate a runbook with a schedule
Register-AzAutomationScheduledRunbook -AutomationAccountName "Contoso17" -RunbookName "Runbk01" -ScheduleName "Sched01" -ResourceGroupName "ResourceGroup01"
This command associates the runbook named Runbk01 with the schedule named Sched01 in the Azure Automation account named Contoso17.
Example 2
Associates a runbook to a schedule. (autogenerated)
Register-AzAutomationScheduledRunbook -AutomationAccountName 'Contoso17' -Parameters <IDictionary> -ResourceGroupName 'ResourceGroup01' -RunbookName 'Runbk01' -ScheduleName 'Sched01'
Parameters
-AutomationAccountName
Specifies an Automation account for the runbook on which this cmdlet operates.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: 1
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Parameter properties
Type: IAzureContextContainer
Default value: None
Supports wildcards: False
DontShow: False
Aliases: AzContext, AzureRmContext, AzureCredential
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Parameters
Specifies a hash table of key/value pairs.
The keys are runbook parameter names.
The values are runbook parameter values.
When the runbook starts in response to the associated schedule, these parameters are passed to the runbook.
Example: -Parameters @{"Key1"="Value1";"Key2"="Value2"}
Parameter properties
Type: IDictionary
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
ByRunbookNameAndScheduleName
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ResourceGroupName
Specifies the name of a resource group for the scheduled runbook.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: 0
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-RunbookName
Specifies the name of the runbook that this cmdlet associates to a schedule.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Aliases: Name
Parameter sets
ByRunbookNameAndScheduleName
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-RunOn
The name of the hybrid runbook worker group.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Aliases: HybridWorker
Parameter sets
ByRunbookNameAndScheduleName
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-ScheduleName
Specifies the name of the schedule to which this cmdlet associates a runbook.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
ByRunbookNameAndScheduleName
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: True
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 .
Outputs