-
-
Save PixelRobots/3c34027d225c7acb09833840b7258ee9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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