Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Install-Module AzureRm.AvailabilitySetManagement
Add-AzureRmAccount
Select-AzureRmSubscription -SubscriptionID "your subscription ID"
Get-Command -Module AzureRm.AvailabilitySetManagement
New-AzureRmAvailabilitySet -Location "East US 2" -Name "myAvailabilitySet" -ResourceGroupName "PixelRobots" -Sku aligned -PlatformFaultDomainCount 2 -PlatformUpdateDomainCount 2
Add-AzureRmAvSetVmToAvailabilitySet -ResourceGroupName "PixelRobots" -VMName "VM1" -OsType windows -AvailabilitySet "myAvailabilitySet"
Get-AzureRmAvailabilitySet -ResourceGroupName "PixelRobots" -Name "myAvailabilitySet"
Remove-AzureRmAvSetVmFromAvailabilitySet -ResourceGroupName "PixelRobots" -VMName vm1 -OsType windows
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.