Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

New-AzAutomationRunbook

Creates an Automation runbook.

Syntax

Default (Default)

New-AzAutomationRunbook
 [-Name] <String>
 [-Description <String>]
 [-Tags <IDictionary>]
 -Type <String>
 [-LogProgress <Boolean>]
 [-LogVerbose <Boolean>]
 [-ResourceGroupName] <String>
 [-AutomationAccountName] <String>
 [-DefaultProfile <IAzureContextContainer>]
 [<CommonParameters>]

Description

The New-AzAutomationRunbook cmdlet creates an empty Azure Automation runbook by using APS. Specify a name for the runbook.

Examples

Example 1: Create a runbook

New-AzAutomationRunbook -AutomationAccountName "Contoso17" -Name "Runbook02" -ResourceGroupName "ResourceGroup01"

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

Example 2

Creates an Automation runbook. (autogenerated)

New-AzAutomationRunbook -AutomationAccountName 'Contoso17' -Name 'Runbook02' -ResourceGroupName 'ResourceGroup01' -Type PowerShell

Parameters

-AutomationAccountName

Specifies the name of the Automation account in which this cmdlet creates a runbook.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-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

-Description

Specifies a description for the runbook.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-LogProgress

Specifies whether the runbook logs progress.

Parameter properties

Type:

Nullable<T>[Boolean]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-LogVerbose

Specifies whether logging includes detailed information.

Parameter properties

Type:

Nullable<T>[Boolean]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-Name

Specifies a name for the runbook.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False
Aliases:RunbookName

Parameter sets

-ResourceGroupName

Specifies the name of the resource group for which this cmdlet creates a runbook.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-Tags

Key-value pairs in the form of a hash table. For example: @{key0="value0";key1=$null;key2="value2"}

Parameter properties

Type:IDictionary
Default value:None
Supports wildcards:False
DontShow:False
Aliases:Tag

Parameter sets

-Type

Specifies the type of runbook that this cmdlet creates. Valid values are:

  • PowerShell
  • GraphicalPowerShell
  • PowerShellWorkflow
  • GraphicalPowerShellWorkflow
  • Graph
  • Python2 The value Graph is obsolete. It is equivalent to GraphicalPowerShellWorkflow.

Parameter properties

Type:String
Default value:None
Accepted values:PowerShell, GraphicalPowerShell, PowerShellWorkflow, GraphicalPowerShellWorkflow, Graph, Python2, Python3, PowerShell72
Supports wildcards:False
DontShow:False

Parameter sets

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.

Inputs

String

IDictionary

Nullable<T>

Outputs

Runbook

Related Links


Feedback

Was this page helpful?