enjoy.coding
  • linkedin
  • github
  • instagram
Sign in Subscribe

network

A collection of 2 posts
azure

How to get public DNS name of a virtual machine using the Azure CLI

With theĀ Azure CLI, use the command az vm list-ip-addresses to get the public IP address name of a virtual machine. The result will be stored in a variable. RESOURCE_GROUP=myResourceGroup VIRTUAL_MACHINE_NAME=myVirtualMachine PUBLIC_IP_NAME=$(az vm list-ip-addresses \ --resource-group $RESOURCE_GROUP \ --name $VIRTUAL_MACHINE_NAME \ --query
14 Jan 2024 1 min read
azure

How to get the public IP address of a virtual machine using the Azure CLI

With theĀ Azure CLI, use the command az vm list-ip-addresses to get the public IP address of a virtual machine. RESOURCE_GROUP=myResourceGroup VIRTUAL_MACHINE_NAME=myVirtualMachine az vm list-ip-addresses \ --resource-group $RESOURCE_GROUP \ --name $VIRTUAL_MACHINE_NAME \ --query "[].virtualMachine.network.publicIpAddresses[0].ipAddress" \ --output tsv And the command
14 Jan 2024 1 min read
Page 1 of 1
enjoy.coding © 2025
Powered by Ghost