Use PowerShell to Add Virtual Machine to Availability Set

Use PowerShell to easily add virtual machines to an Availability Set.

John Savill

January 11, 2015

1 Min Read
PowerShell command prompt

Q: How can I use PowerShell to add a virtual machine to an Availability Set in Azure?

A: Use the Set-AzureAvailabilitySet cmdlet to add a virtual machine to an availability set; for example:

Get-AzureVM -ServiceName "savilltech101" -Name "WebSrv3" |    Set-AzureAvailabilitySet -AvailabilitySetName "IIS" |    Update-AzureVM

To remove, simply set the AvailabilitySetName to "".

About the Author

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like