Set-AzureAutomationRunbookDefinition
Updates the draft definition of a runbook.
Note
The cmdlets referenced in this documentation are for managing legacy Azure resources that use Service Management APIs. See the Az PowerShell module for cmdlets to manage Azure Resource Manager resources.
Syntax
Set-AzureAutomationRunbookDefinition
-Name <String>
-Path <String>
[-Overwrite]
-AutomationAccountName <String>
[-Profile <AzureSMProfile>]
[<CommonParameters>]
Description
Important
This PowerShell command for Azure Automation is longer supported as of 01/23/2020. The Azure Service Management model is deprecated for Azure Automation and was disabled on that date. Please use the commands which support the Azure Resource Management model in Az.Automation.
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.
Parameters
-AutomationAccountName
Specifies the name of an Automation account.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Name
Specifies a name.
Type: | String |
Aliases: | RunbookName |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Overwrite
Indicates whether to overwrite an existing draft definition.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Path
Specifies the path to a runbook.
Type: | String |
Aliases: | RunbookPath |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
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 |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Outputs
Microsoft.Azure.Commands.Automation.Model.RunbookDefinition