经典VM的是,当使用Azure的规范使用manage.windowsazure.com其中,每个虚拟机必须连接到它的云服务在默认情况下和资源,如虚拟网络和防火墙(ACL)进行了静态到每个资源。
基于Azure资源管理器(ARM)的部署为您提供了灵活的部署模型(例如,一个防火墙/ NSG用于x个虚拟机)的强大功能。详细的研究,可以在下面的链接中找到:
Azure Resource Manager based deployments explained
对于你的问题,你可以使用下面的cmdlet来获取所有经典的虚拟机。
#login your classic (work AD/Personal) account using the pop-up
Add-AzureAccount
# Get All subscriptions under the non-rm account. DO NOT USE Get-AzureRMSubscription for any classic resources
Get-AzureSubscription
# Select the subscription to use using the Subscription name or ID (if all your subscription names say pay-as-you-go for e.g. you may want to use your subscription ID)
Select-AzureSubscription -SubscriptionName "enter-your-subscription-name" OR -SubscriptionId "alternatively-use-subscription-id"
#List all the VM's in a variable for further use (if needed, else direct display)
$vmList = Get-AzureVM
#Output the Virtual Machines on the subscription
Write-Output ($vmList)
完成!
相关:https://serverfault.com/questions/744858/whats-the-difference-between-get-azurermvm-and-get-azurevm –