Can we change the name of an Azure Virtual Machine in the Azure portal? I am sure we cannot change it via portal, do we have any PowerShell cmdlet to change the virtual machine name??
Note: I am not referring to VM name inside the VM, but the name that is displayed in the Azure Portal.
Resource names for virtual machines are immutable. So, you will need to redeploy your virtual machine.
Best way to do this is to delete the current one, maintaining the disks, and then create a new one with the correct name pointing to those disks.