How to rebuild an Azure VM from an existing OS disk (ARM)

Use the below script to recreate a ARM VM via PowerShell. Modify the highlighted sections only

 

#Required Variables
$subID = ‘SubscriptionID’
$rgname = ‘ResourceGroupName’
$loc = ‘Location’
$vmsize = ‘VirtualMachineSize’
$vmname = ‘VirtualMachineName’
$nic1 = ‘NetworkInterface1Name’
$osDiskName = ‘DiskOSName’
$osDiskVhdUri = ‘DiskOSUri’

  Continue reading “How to rebuild an Azure VM from an existing OS disk (ARM)”