New-AzureRmAvailabilitySet

Creates an Azure availability set.

Warning

The AzureRM PowerShell module has been officially deprecated as of February 29, 2024. Users are advised to migrate from AzureRM to the Az PowerShell module to ensure continued support and updates.

Although the AzureRM module may still function, it's no longer maintained or supported, placing any continued use at the user's discretion and risk. Please refer to our migration resources for guidance on transitioning to the Az module.

Syntax

New-AzureRmAvailabilitySet
   [-ResourceGroupName] <String>
   [-Name] <String>
   [-Location] <String>
   [[-PlatformUpdateDomainCount] <Int32>]
   [[-PlatformFaultDomainCount] <Int32>]
   [[-Sku] <String>]
   [-Tag <Hashtable>]
   [-AsJob]
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]

Description

The New-AzureRmAvailabilitySet cmdlet creates an Azure availability set.

Examples

Example 1: Create an availability set

PS C:\> New-AzureRmAvailabilitySet -ResourceGroupName "ResourceGroup11" -Name "AvailabilitySet03" -Location "West US"

This command creates an availability set named AvailablitySet03 in the resource group named ResourceGroup11.

Parameters

-AsJob

Run cmdlet in the background and return a Job to track progress.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-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 for the availability set.

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

-Name

Specifies a name for the availability set.

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

-PlatformFaultDomainCount

Specifies the platform fault domain count.

Type:Nullable<T>[Int32]
Position:4
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-PlatformUpdateDomainCount

Specifies the platform update domain count.

Type:Nullable<T>[Int32]
Position:3
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-ResourceGroupName

Specifies the name of a resource group.

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

-Sku

The Name of Sku. The acceptable values for this parameter are:

  • Aligned: For managed disks
  • Classic: For unmanaged disks
Type:String
Position:5
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-Tag

Key-value pairs in the form of a hash table.

Type:Hashtable
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

String

Nullable<T>[[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]

Outputs

PSAvailabilitySet