Life's random bits By b1thunt3r (aka Ishan Jain)…
List Azure VMs Public and Private IPs

List Azure VMs Public and Private IPs

Ishan jain
Quick single command to get all the public and public IPs of all the VMs

You can use Azure CLI to easily retrieve both Public and Private IPs of VMs in Azure.

List for all VMs:

# Azure CLI
az vm list-ip-addresses --output table

List for a single VM:

# Azure CLI
az vm list-ip-addresses --resource-group <resourceGroup> --name <vmName> --output table

List for all VMs in a resource group:

# Azure CLI
az vm list-ip-addresses --resource-group <resourcGroup> --output table

So far I have not been able to find any equivalent (single command) in PowerShell.