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.
View all virtual machines in a subscription that are part of an Availability Set.
January 12, 2015
Q: How can I quickly view all virtual machines in my Azure subscription that are part of an Availability Set?
A: The following PowerShell code will list all virtual machines within a subscription that are part of an Availability Set.
(Get-AzureService).servicename | foreach {Get-AzureVM -ServiceName $_ } | Where-Object {$_.AvailabilitySetName –ne $null } | Select name,AvailabilitySetName |Format-Table Name, AvailabilitySetName -AutoSize
You May Also Like