Force stop Microsoft Azure virtual machine
In Azure Cloud Shell:
az vm restart -g MyResourceGroup -n MyVm --force
Replace MyResourceGroup with the name of the resource group
Replace MyVM with the name of the virtual machine
Reference
https://cloudcompanyapps.com/2021/10/15/cannot-stop-or-start-azure-vm/