I have created below script which will spin azurerm vm from an existing vhd. script works fine
however I will have to modify the variables ( $vmname=‘TESTVM’, $bootstorageaccount=‘TESTSTORAGE’, $vhduri= ‘https://TESTSTORAGE.blob.core.windows.net/TESTVM.vhd’, $OSDISKNAME = “TESTVMOSDISK” & $size=‘Standard_D3_v2’ $ip=‘10.0.1.9’)
everytime I want to create a new VM
is there a way to make the script better, or to automate the variables to take from an notepad or excel or ask on commandline to enter those details?
Script : vmcreate · GitHub