New-​Azure​Automation​Runbook

Creates a runbook.

Syntax

New-AzureAutomationRunbook
   -AutomationAccountName <String>
   [-Description <String>]
   -Name <String>
   [-Profile <AzureSMProfile>]
   [-Tags <String[]>]
   [<CommonParameters>]
New-AzureAutomationRunbook
   -AutomationAccountName <String>
   [-Description <String>]
   -Path <String>
   [-Profile <AzureSMProfile>]
   [-Tags <String[]>]
   [<CommonParameters>]

Description

The New-AzureAutomationRunbook cmdlet creates a new, empty Microsoft Azure Automation runbook. Specify a name to create a new runbook.

You can also specify the path to a Windows PowerShell script (.ps1 ) file to import a runbook. The script to import must contain a single Windows PowerShell Workflow definition. The name of this Windows PowerShell Workflow becomes the name of the runbook.

Examples

Example 1: Create a runbook

PS C:\> New-AzureAutomationRunbook -AutomationAccountName "Contoso17" -Name "Runbook02"

This command creates a new runbook named Runbook02 in the Automation account named Contoso17.

Required Parameters

-AutomationAccountName

Specifies the name of the Automation account.

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

Specifies the name for the runbook.

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

Specifies the path.

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

Optional Parameters

-Description

Specifies a description for the runbook.

Type:String
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
-Tags

Specifies tags for the runbook.

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

Outputs

Microsoft.Azure.Commands.Automation.Model.Runbook