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
(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
-Description
Specifies a description for the runbook.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-LogProgress
Specifies whether the runbook logs progress.
Parameter properties
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-LogVerbose
Specifies whether logging includes detailed information.
Parameter properties
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-Name
Specifies a name for the runbook.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Aliases: RunbookName
Parameter sets
(All)
Position: 2
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-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
(All)
Position: 0
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
Key-value pairs in the form of a hash table. For example:
@{key0="value0";key1=$null;key2="value2"}
Type: IDictionary
Default value: None
Supports wildcards: False
DontShow: False
Aliases: Tag
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-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
(All)
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
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