Help I deleted an Azure VM!!! How to recover?

In our Azure test account I regularly delete and recreate VM’s. But there are also VM’s that are used for longer period. During the day I was cleaning up a VM that I installed for a test and accidentally deleted my main demo firewall VM. The attached disks, network interface were not deleted. The question became can I recover and recreate the VM with the same disks and public IP?

Here are 2 options I found:

Azure Portal: From the Azure Portal you can open the os disk and use the create VM option in the overview. From there you receive a new blade like you would when creating a new VM. If you want to keep the same public IP you need to dissociate the public IP from the network interface that is still existing and delete the network interface. That way you can assign the static private IP to this new VM.

Powershell: Using powershell you can more flexible and reuse the network interface as well as the disks. In the example you can see the different steps that I used to recreate the VM.