New-AzureRmAutomationAccount

Creates an Automation account.

Caution

Because Az PowerShell modules now have all the capabilities of AzureRM PowerShell modules and more, we'll retire AzureRM PowerShell modules on 29 February 2024.

To avoid service interruptions, update your scripts that use AzureRM PowerShell modules to use Az PowerShell modules by 29 February 2024. To automatically update your scripts, follow the quickstart guide.

Syntax

New-AzureRmAutomationAccount
   [-ResourceGroupName] <String>
   [-Name] <String>
   [-Location] <String>
   [-Plan <String>]
   [-Tags <IDictionary>]
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]

Description

The New-AzureRmAutomationAccount cmdlet creates an Azure Automation account in a resource group. An Automation account is a container for Automation resources that is isolated from the resources of other Automation accounts. Automation resources include runbooks, Desired State Configuration (DSC) configurations, jobs, and assets.

Examples

Example 1: Create an automation account

PS C:\> New-AzureRmAutomationAccount -Name "ContosoAutomationAccount" -Location "East US" -ResourceGroupName "ResourceGroup01"

This command creates a new automation account named ContosoAutomationAccount in the East US region.

Parameters

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with azure

Type:IAzureContextContainer
Aliases:AzureRmContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Location

Specifies the location in which this cmdlet creates the Automation account. To obtain valid locations, use the Get-AzureRMLocation cmdlet.

Type:String
Position:2
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-Name

Specifies a name for the Automation account.

Type:String
Aliases:AutomationAccountName
Position:1
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-Plan

Specifies the plan for the Automation account. Valid values are:

  • Basic
  • Free
Type:String
Accepted values:Free, Basic
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-ResourceGroupName

Specifies the name of a resource group to which this cmdlet adds an Automation account.

Type:String
Position:0
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-Tags

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

Type:IDictionary
Aliases:Tag
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

Inputs

String

IDictionary

Outputs

AutomationAccount