az vm show

In this article, I will walk you through the syntax and usage of the az vm show Azure CLI command with certain examples.

az vm show

This command helps you to get the details of an Azure VM.

Syntax

az vm show [--ids] [--name][--resource-group]

Example

The below command helps you to show information about an Azure VM named AzurelessonsNewVM that belongs to the newresgroup Resource group.

az vm show -g newresgroup -n AzurelessonsNewVM -d

After executing the above command, I got the expected output as shown below.

{
  "additionalCapabilities": {
    "hibernationEnabled": false,
    "ultraSsdEnabled": null
  },
  "applicationProfile": null,
  "availabilitySet": null,
  "billingProfile": null,
  "capacityReservation": null,
  "diagnosticsProfile": {
    "bootDiagnostics": {
      "enabled": true,
      "storageUri": null
    }
  },
  "etag": "\"20\"",
  "evictionPolicy": null,
  "extendedLocation": null,
  "extensionsTimeBudget": null,
  "fqdns": "",
  "hardwareProfile": {
    "vmSize": "Standard_B1ms",
    "vmSizeProperties": null
  },
  "host": null,
  "hostGroup": null,
  "id": "/subscriptions/1cdf4300-dee5-4518-9c9c-feaa72a5cbd1/resourceGroups/newresgroup/providers/Microsoft.Compute/virtualMachines/AzurelessonsNewVM",
  "identity": null,
  "licenseType": null,
  "location": "centralus",
  "macAddresses": "60-45-BD-33-93-6E",
  "managedBy": null,
  "name": "AzurelessonsNewVM",
  "networkProfile": {
    "networkApiVersion": null,
    "networkInterfaceConfigurations": null,
    "networkInterfaces": [
      {
        "deleteOption": "Detach",
        "id": "/subscriptions/1cdf4300-dee5-4518-9c9c-feaa72a5cbd1/resourceGroups/newresgroup/providers/Microsoft.Network/networkInterfaces/azurelessonsnewvm477_z1",
        "primary": null,
        "resourceGroup": "newresgroup"
      }
    ]
  },
  "osProfile": {
    "adminPassword": null,
    "adminUsername": "Rajkishore",
    "allowExtensionOperations": true,
    "computerName": "AzurelessonsNewVM",
    "customData": null,
    "linuxConfiguration": {
      "disablePasswordAuthentication": false,
      "enableVmAgentPlatformUpdates": null,
      "patchSettings": {
        "assessmentMode": "ImageDefault",
        "automaticByPlatformSettings": null,
        "patchMode": "ImageDefault"
      },
      "provisionVmAgent": true,
      "ssh": null
    },
    "requireGuestProvisionSignal": true,
    "secrets": [],
    "windowsConfiguration": null
  },
  "plan": null,
  "platformFaultDomain": null,
  "powerState": "VM stopped",
  "priority": null,
  "privateIps": "10.0.0.4",
  "provisioningState": "Succeeded",
  "proximityPlacementGroup": null,
  "publicIps": "20.15.226.75",
  "resourceGroup": "newresgroup",
  "resources": null,
  "scheduledEventsPolicy": null,
  "scheduledEventsProfile": null,
  "securityProfile": {
    "encryptionAtHost": null,
    "encryptionIdentity": null,
    "proxyAgentSettings": null,
    "securityType": "TrustedLaunch",
    "uefiSettings": {
      "secureBootEnabled": true,
      "vTpmEnabled": true
    }
  },
  "storageProfile": {
    "dataDisks": [],
    "diskControllerType": "SCSI",
    "imageReference": {
      "communityGalleryImageId": null,
      "exactVersion": "20.04.202501110",
      "id": null,
      "offer": "0001-com-ubuntu-server-focal",
      "publisher": "canonical",
      "sharedGalleryImageId": null,
      "sku": "20_04-lts-gen2",
      "version": "latest"
    },
    "osDisk": {
      "caching": "ReadWrite",
      "createOption": "FromImage",
      "deleteOption": "Delete",
      "diffDiskSettings": null,
      "diskSizeGb": 30,
      "encryptionSettings": null,
      "image": null,
      "managedDisk": {
        "diskEncryptionSet": null,
        "id": "/subscriptions/1cdf4300-dee5-4518-9c9c-feaa72a5cbd1/resourceGroups/NEWRESGROUP/providers/Microsoft.Compute/disks/AzurelessonsNewVM_OsDisk_1_3ded8e6ecd4a4ff39343f870c03502cf",
        "resourceGroup": "NEWRESGROUP",
        "securityProfile": null,
        "storageAccountType": "Premium_LRS"
      },
      "name": "AzurelessonsNewVM_OsDisk_1_3ded8e6ecd4a4ff39343f870c03502cf",
      "osType": "Linux",
      "vhd": null,
      "writeAcceleratorEnabled": null
    }
  },
  "tags": null,
  "timeCreated": "2025-02-04T06:19:34.034169+00:00",
  "type": "Microsoft.Compute/virtualMachines",
  "userData": null,
  "virtualMachineScaleSet": null,
  "vmId": "6d1499c4-8557-408d-b9f8-2ab25fcd34d0",
  "zones": [
    "1"
  ]
}

You can see the same output as shown in the screenshot shown below.

az vm show

Video Tutorial

You may also like following the articles below.

Azure Virtual Machine

DOWNLOAD FREE AZURE VIRTUAL MACHINE PDF

Download our free 25+ page Azure Virtual Machine guide and master cloud deployment today!