Set-​Azure​Automation​Runbook​Definition

Updates the draft definition of a runbook.

Syntax

Set-AzureAutomationRunbookDefinition
   -AutomationAccountName <String>
   -Name <String>
   [-Overwrite]
   -Path <String>
   [-Profile <AzureSMProfile>]
   [<CommonParameters>]

Description

The Set-AzureAutomationRunbookDefinition cmdlet updates the draft definition of a Microsoft Azure Automation runbook. Specify a Windows PowerShell script (.ps1) file that contains a runbook that becomes the draft runbook.

If a draft definition already exists, use the Overwrite parameter to force the cmdlet to overwrite the existing draft.

Examples

Example 1: Overwrite an existing draft definition of a runbook

PS C:\> Set-AzureAutomationRunbookDefinition -AutomationAccountName "Contoso17" -Name "Runbk01" -Path ".\App01.ps1" -Overwrite

This command overwrites the existing draft definition of a runbook.

Required Parameters

-AutomationAccountName

Specifies the name of an Automation account.

Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-Name

Specifies a name.

Type:String
Aliases:RunbookName
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-Path

Specifies the path to a runbook.

Type:String
Aliases:RunbookPath
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False

Optional Parameters

-Overwrite

Indicates whether to overwrite an existing draft definition.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters: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.

Type:AzureSMProfile
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Outputs

Microsoft.Azure.Commands.Automation.Model.RunbookDefinition