%3CLINGO-SUB%20id%3D%22lingo-sub-336204%22%20slang%3D%22en-US%22%3EIaC%20on%20Azure%20%E2%80%93%20Windows%20Server%20Virtual%20Machine%20Deployment%20made%20easy%20with%20ARM%20Template%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-336204%22%20slang%3D%22en-US%22%3E%0A%20%26lt%3Bmeta%20http-equiv%3D%22Content-Type%22%20content%3D%22text%2Fhtml%3B%20charset%3DUTF-8%22%20%2F%26gt%3B%3CSTRONG%3E%20First%20published%20on%20MSDN%20on%20Feb%2025%2C%202017%20%3C%2FSTRONG%3E%20%3CBR%20%2F%3E%3CP%3E%3CI%3E%20Authored%20by%20Ryen%20Tang%20%3C%2FI%3E%3C%2FP%3E%3CBR%20%2F%3E%20%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F73437iD0553C14BBAC1E27%22%20%2F%3E%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%202%20weeks%20ago%2C%20I%20touched%20on%20the%20topic%20of%20Infrastructure%20as%20Code%20(IaC)%2C%20their%20benefits%20and%20an%20example%20on%20how%20to%20consistently%20create%20an%20Azure%20resource%20group%20for%20deploying%20a%20virtual%20network%20with%20a%20set%20of%20subnets%20and%20a%20gateway%20subnet.%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20As%20a%20continuation%20of%20the%20previous%20%3CA%20href%3D%22https%3A%2F%2Fblogs.msdn.microsoft.com%2Fazuredev%2F2017%2F02%2F11%2Fiac-on-azure-an-introduction-of-infrastructure-as-code-iac-with-azure-resource-manager-arm-template%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3EAn%20introduction%20to%20Infrastructure%20as%20Code%20(IaC)%20using%20Azure%20Resource%20Manager%20(ARM)%20Template%20%3C%2FA%3E%2C%20I%20will%20be%20sharing%20with%20you%20on%20using%20Template%20to%20consistently%20create%20an%20Azure%20resource%20group%20for%20deploying%20a%20virtual%20machine%20with%20an%20independent%20virtual%20network%20subnet%2C%20and%20attach%20a%20public%20IP%20address%20for%20remote%20desktop%20connection%20to%20the%20virtual%20machine%20in%20the%20cloud.%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20Before%20we%20begin%2C%20it%20will%20be%20advisable%20to%20view%20the%20previous%20blog%20post%20on%20how%20to%20create%20a%20template%20within%20Azure%20Templates%20service%20for%20those%20that%20have%20not%20view%20the%20last%20blog%20post.%20That%20previous%20blog%20post%20will%20explain%20on%20how%20to%20implement%20the%20JSON%20code%20below%20where%20you%20will%20have%20to%20copy%2C%20paste%20it%20into%20the%20newly%20created%20template%20name%20(Eg.%20iaas_virtual_machine_windowserver_v1%20)%20of%20your%20choice%2C%20save%20it%20and%20select%20deploy.%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20Since%20I%20am%20creating%20a%20generic%20ARM%20template%20that%20must%20be%20able%20to%20deploy%20the%20different%20types%20of%20VM%20size%20in%20all%20region%2C%20the%20following%20JSON%20code%20will%20only%20contain%20VM%20Size%20of%20A0-A7%2C%20D1_v2-D15_v2%20and%20F1-F16%20series%20based%20on%20the%20list%20in%20%3CA%20href%3D%22https%3A%2F%2Fazure.microsoft.com%2Fen-gb%2Fregions%2Fservices%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3EProducts%20available%20by%20region%20%3C%2FA%3E.%20If%20you%20are%20interested%20in%20the%20differences%20between%20the%20different%20types%20of%20VM%20Size%2C%20you%20can%20refer%20to%20this%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fvirtual-machines%2Fvirtual-machines-windows-sizes%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3ESizes%20for%20Windows%20virtual%20machines%20in%20Azure%20%3C%2FA%3Edocument%20for%20more%20details.%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20%3CSTRONG%3E%20Let%20us%20begin...%20%3C%2FSTRONG%3E%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%201.%20Copy%20the%20JSON%20code%20below%2C%20paste%20it%20into%20the%20new%20ARM%20Template%20and%20save%20it%20%3CBR%20%2F%3E%3CBR%20%2F%3E%5Bcode%20language%3D%22js%22%20collapse%3D%22true%22%20title%3D%22Windows%20Server%20ARM%20Template%20JSON%20Code%20(Click%20to%20Expand)%22%5D%20%3CBR%20%2F%3E%7B%20%3CBR%20%2F%3E%22%24schema%22%3A%20%22%3CA%20href%3D%22https%3A%2F%2Fschema.management.azure.com%2Fschemas%2F2015-01-01%2FdeploymentTemplate.json%23%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fschema.management.azure.com%2Fschemas%2F2015-01-01%2FdeploymentTemplate.json%23%3C%2FA%3E%22%2C%20%3CBR%20%2F%3E%22contentVersion%22%3A%20%221.0.0.0%22%2C%20%3CBR%20%2F%3E%22parameters%22%3A%20%7B%20%3CBR%20%2F%3E%22virtualNetworksName%22%3A%20%7B%20%3CBR%20%2F%3E%22type%22%3A%20%22string%22%2C%20%3CBR%20%2F%3E%22defaultValue%22%3A%20null%2C%20%3CBR%20%2F%3E%22metadata%22%3A%20%7B%20%3CBR%20%2F%3E%22description%22%3A%20%22The%20name%20of%20the%20virtual%20network%20for%20the%20virtual%20machine.%22%20%3CBR%20%2F%3E%7D%20%3CBR%20%2F%3E%7D%2C%20%3CBR%20%2F%3E%22virtualNetworkAddressPrefix%22%3A%20%7B%20%3CBR%20%2F%3E%22type%22%3A%20%22string%22%2C%20%3CBR%20%2F%3E%22defaultValue%22%3A%20null%2C%20%3CBR%20%2F%3E%22minLength%22%3A%209%2C%20%3CBR%20%2F%3E%22maxLength%22%3A%2018%2C%20%3CBR%20%2F%3E%22metadata%22%3A%20%7B%20%3CBR%20%2F%3E%22description%22%3A%20%22The%20IP%20addresses%20prefixes%20for%20the%20virtual%20network.%20(Eg.%2010.1.0.0%2F16%20)%22%20%7D%20%7D%2C%20%22virtualNetworkSubnetName%22%3A%20%7B%20%22type%22%3A%20%22string%22%2C%20%22defaultValue%22%3A%20null%2C%20%22metadata%22%3A%20%7B%20%22description%22%3A%20%22The%20name%20of%20the%20virtual%20network%20subnet.%20(Eg.%20Subnet-Dev%20)%22%20%7D%20%7D%2C%20%22virtualNetworkSubnetAddressPrefix%22%3A%20%7B%20%22type%22%3A%20%22string%22%2C%20%22defaultValue%22%3A%20null%2C%20%22minLength%22%3A%209%2C%20%22maxLength%22%3A%2018%2C%20%22metadata%22%3A%20%7B%20%22description%22%3A%20%22The%20IP%20addresses%20prefixes%20for%20the%20virtual%20network.%20(Eg.%2010.1.1.0%2F24%20)%22%20%3CBR%20%2F%3E%7D%20%3CBR%20%2F%3E%7D%2C%20%3CBR%20%2F%3E%22storageAccountsName%22%3A%20%7B%20%3CBR%20%2F%3E%22type%22%3A%20%22string%22%2C%20%3CBR%20%2F%3E%22defaultValue%22%3A%20null%2C%20%3CBR%20%2F%3E%22minLength%22%3A%203%2C%20%3CBR%20%2F%3E%22maxLength%22%3A%2024%2C%20%3CBR%20%2F%3E%22metadata%22%3A%20%7B%20%3CBR%20%2F%3E%22description%22%3A%20%22The%20name%20of%20the%20storage%20account%20for%20storing%20the%20virtual%20machine.%22%20%3CBR%20%2F%3E%7D%20%3CBR%20%2F%3E%7D%2C%20%3CBR%20%2F%3E%22virtualMachineName%22%3A%20%7B%20%3CBR%20%2F%3E%22type%22%3A%20%22string%22%2C%20%3CBR%20%2F%3E%22defaultValue%22%3A%20null%2C%20%3CBR%20%2F%3E%22metadata%22%3A%20%7B%20%3CBR%20%2F%3E%22description%22%3A%20%22The%20name%20of%20the%20virtual%20machine.%22%20%3CBR%20%2F%3E%7D%20%3CBR%20%2F%3E%7D%2C%20%3CBR%20%2F%3E%22virtualMachineSize%22%3A%20%7B%20%3CBR%20%2F%3E%22type%22%3A%20%22string%22%2C%20%3CBR%20%2F%3E%22allowedValues%22%3A%20%5B%20%3CBR%20%2F%3E%22Standard_A0%22%2C%20%22Standard_A1%22%2C%20%22Standard_A2%22%2C%20%22Standard_A3%22%2C%20%3CBR%20%2F%3E%22Standard_A4%22%2C%20%22Standard_A5%22%2C%20%22Standard_A6%22%2C%20%22Standard_A7%22%2C%20%3CBR%20%2F%3E%3CBR%20%2F%3E%22Standard_D1_v2%22%2C%20%22Standard_D2_v2%22%2C%20%22Standard_D3_v2%22%2C%20%22Standard_D4_v2%22%2C%20%3CBR%20%2F%3E%22Standard_D5_v2%22%2C%20%22Standard_D6_v2%22%2C%20%22Standard_D7_v2%22%2C%20%22Standard_D8_v2%22%2C%20%3CBR%20%2F%3E%22Standard_D9_v2%22%2C%20%22Standard_D10_v2%22%2C%20%22Standard_D11_v2%22%2C%20%22Standard_D12_v2%22%2C%20%3CBR%20%2F%3E%22Standard_D13_v2%22%2C%20%22Standard_D14_v2%22%2C%20%22Standard_D15_v2%22%2C%20%3CBR%20%2F%3E%3CBR%20%2F%3E%22Standard_F1%22%2C%20%22Standard_F2%22%2C%20%22Standard_F4%22%2C%20%22Standard_F8%22%2C%20%22Standard_F16%22%20%3CBR%20%2F%3E%5D%2C%20%3CBR%20%2F%3E%22defaultValue%22%3A%20%22Standard_A0%22%2C%20%3CBR%20%2F%3E%22metadata%22%3A%20%7B%20%3CBR%20%2F%3E%22description%22%3A%20%22The%20size%20of%20the%20virtual%20machine.%22%20%3CBR%20%2F%3E%7D%20%3CBR%20%2F%3E%7D%2C%20%3CBR%20%2F%3E%22virtualMachineDataDiskSize%22%3A%20%7B%20%3CBR%20%2F%3E%22type%22%3A%20%22int%22%2C%20%3CBR%20%2F%3E%22defaultValue%22%3A%2040%2C%20%3CBR%20%2F%3E%22minValue%22%3A%2010%2C%20%3CBR%20%2F%3E%22maxValue%22%3A%201023%2C%20%3CBR%20%2F%3E%22metadata%22%3A%20%7B%20%3CBR%20%2F%3E%22description%22%3A%20%22The%20GB%20size%20of%20the%20data%20disk%20for%20the%20virtual%20machine.%22%20%3CBR%20%2F%3E%7D%20%3CBR%20%2F%3E%7D%2C%20%3CBR%20%2F%3E%22virtualMachineSKU%22%3A%7B%20%3CBR%20%2F%3E%22type%22%3A%20%22string%22%2C%20%3CBR%20%2F%3E%22allowedValues%22%3A%20%5B%20%3CBR%20%2F%3E%222008-R2-SP1%22%2C%20%3CBR%20%2F%3E%222008-R2-SP1-BYOL%22%2C%20%3CBR%20%2F%3E%222012-Datacenter%22%2C%20%3CBR%20%2F%3E%222012-Datacenter-BYOL%22%2C%20%3CBR%20%2F%3E%222012-R2-Datacenter%22%2C%20%3CBR%20%2F%3E%222012-R2-Datacenter-BYOL%22%2C%20%3CBR%20%2F%3E%222016-Datacenter%22%2C%20%3CBR%20%2F%3E%222016-Datacenter-with-Containers%22%2C%20%3CBR%20%2F%3E%222016-Nano-Server%22%20%3CBR%20%2F%3E%5D%2C%20%3CBR%20%2F%3E%22defaultValue%22%3A%20%222016-Datacenter%22%2C%20%3CBR%20%2F%3E%22metadata%22%3A%20%7B%20%3CBR%20%2F%3E%22description%22%3A%20%22The%20SKU%20of%20the%20Windows%20Server%20virtual%20machine.%22%20%3CBR%20%2F%3E%7D%20%3CBR%20%2F%3E%7D%2C%20%3CBR%20%2F%3E%22virtualMachineNetworkInterfacesName%22%3A%20%7B%20%3CBR%20%2F%3E%22type%22%3A%20%22string%22%2C%20%3CBR%20%2F%3E%22defaultValue%22%3A%20null%2C%20%3CBR%20%2F%3E%22metadata%22%3A%20%7B%20%3CBR%20%2F%3E%22description%22%3A%20%22The%20name%20of%20the%20network%20interface%20for%20the%20virtual%20machine.%22%20%3CBR%20%2F%3E%7D%20%3CBR%20%2F%3E%7D%2C%20%3CBR%20%2F%3E%22virtualMachinePublicIPAddressesName%22%3A%20%7B%20%3CBR%20%2F%3E%22type%22%3A%20%22string%22%2C%20%3CBR%20%2F%3E%22defaultValue%22%3A%20null%2C%20%3CBR%20%2F%3E%22metadata%22%3A%20%7B%20%3CBR%20%2F%3E%22description%22%3A%20%22The%20name%20of%20the%20public%20IP%20addresses%20for%20the%20virtual%20machine.%22%20%3CBR%20%2F%3E%7D%20%3CBR%20%2F%3E%7D%2C%20%3CBR%20%2F%3E%22virtualMachineAdminUsername%22%3A%20%7B%20%3CBR%20%2F%3E%22type%22%3A%20%22string%22%2C%20%3CBR%20%2F%3E%22defaultValue%22%3A%20null%2C%20%3CBR%20%2F%3E%22metadata%22%3A%20%7B%20%3CBR%20%2F%3E%22description%22%3A%20%22The%20administrator%20username%20for%20the%20virtual%20machine.%22%20%3CBR%20%2F%3E%7D%20%3CBR%20%2F%3E%7D%2C%20%3CBR%20%2F%3E%22virtualMachineAdminPassword%22%3A%20%7B%20%3CBR%20%2F%3E%22type%22%3A%20%22securestring%22%2C%20%3CBR%20%2F%3E%22defaultValue%22%3A%20null%2C%20%3CBR%20%2F%3E%22metadata%22%3A%20%7B%20%3CBR%20%2F%3E%22description%22%3A%20%22The%20administrator%20password%20for%20the%20virtual%20machine.%22%20%3CBR%20%2F%3E%7D%20%3CBR%20%2F%3E%7D%2C%20%3CBR%20%2F%3E%22resourceOwnerNameTag%22%3A%20%7B%20%3CBR%20%2F%3E%22type%22%3A%20%22string%22%2C%20%3CBR%20%2F%3E%22defaultValue%22%3A%20null%2C%20%3CBR%20%2F%3E%22metadata%22%3A%20%7B%20%3CBR%20%2F%3E%22description%22%3A%20%22The%20name%20of%20the%20resource%20owner%20for%20the%20Owner%20Name%20tag.%22%20%3CBR%20%2F%3E%7D%20%3CBR%20%2F%3E%7D%2C%20%3CBR%20%2F%3E%22businessUnitTag%22%3A%20%7B%20%3CBR%20%2F%3E%22type%22%3A%20%22string%22%2C%20%3CBR%20%2F%3E%22defaultValue%22%3A%20null%2C%20%3CBR%20%2F%3E%22metadata%22%3A%20%7B%20%3CBR%20%2F%3E%22description%22%3A%20%22The%20name%20of%20the%20department%20for%20the%20Business%20Unit%20tag.%22%20%3CBR%20%2F%3E%7D%20%3CBR%20%2F%3E%7D%2C%20%3CBR%20%2F%3E%22costCenterTag%22%3A%20%7B%20%3CBR%20%2F%3E%22type%22%3A%20%22string%22%2C%20%3CBR%20%2F%3E%22defaultValue%22%3A%20null%2C%20%3CBR%20%2F%3E%22metadata%22%3A%20%7B%20%3CBR%20%2F%3E%22description%22%3A%20%22A%20cost%20identifier%20for%20the%20Cost%20Center%20tag.%22%20%3CBR%20%2F%3E%7D%20%3CBR%20%2F%3E%7D%2C%20%3CBR%20%2F%3E%22environmentTag%22%3A%20%7B%20%3CBR%20%2F%3E%22allowedValues%22%3A%20%5B%20%3CBR%20%2F%3Enull%2C%20%3CBR%20%2F%3E%22Development%22%2C%20%3CBR%20%2F%3E%22Staging%22%2C%20%3CBR%20%2F%3E%22Production%22%20%3CBR%20%2F%3E%5D%2C%20%3CBR%20%2F%3E%22type%22%3A%20%22string%22%2C%20%3CBR%20%2F%3E%22defaultValue%22%3A%20null%2C%20%3CBR%20%2F%3E%22metadata%22%3A%20%7B%20%3CBR%20%2F%3E%22description%22%3A%20%22The%20name%20for%20the%20Environment%20tag.%22%20%3CBR%20%2F%3E%7D%20%3CBR%20%2F%3E%7D%2C%20%3CBR%20%2F%3E%22maintenanceWindowStartTag%22%3A%20%7B%20%3CBR%20%2F%3E%22allowedValues%22%3A%20%5B%20%3CBR%20%2F%3Enull%2C%20%3CBR%20%2F%3E%22Mon%2000%3A00%22%2C%20%22Mon%2001%3A00%22%2C%20%22Mon%2002%3A00%22%2C%20%22Mon%2003%3A00%22%2C%20%22Mon%2004%3A00%22%2C%20%22Mon%2005%3A00%22%2C%20%3CBR%20%2F%3E%22Mon%2006%3A00%22%2C%20%22Mon%2007%3A00%22%2C%20%22Mon%2008%3A00%22%2C%20%22Mon%2009%3A00%22%2C%20%22Mon%2010%3A00%22%2C%20%22Mon%2011%3A00%22%2C%20%3CBR%20%2F%3E%22Mon%2012%3A00%22%2C%20%22Mon%2013%3A00%22%2C%20%22Mon%2014%3A00%22%2C%20%22Mon%2015%3A00%22%2C%20%22Mon%2016%3A00%22%2C%20%22Mon%2017%3A00%22%2C%20%3CBR%20%2F%3E%22Mon%2018%3A00%22%2C%20%22Mon%2019%3A00%22%2C%20%22Mon%2020%3A00%22%2C%20%22Mon%2021%3A00%22%2C%20%22Mon%2022%3A00%22%2C%20%22Mon%2023%3A00%22%2C%20%3CBR%20%2F%3E%22Tue%2000%3A00%22%2C%20%22Tue%2001%3A00%22%2C%20%22Tue%2002%3A00%22%2C%20%22Tue%2003%3A00%22%2C%20%22Tue%2004%3A00%22%2C%20%22Tue%2005%3A00%22%2C%20%3CBR%20%2F%3E%22Tue%2006%3A00%22%2C%20%22Tue%2007%3A00%22%2C%20%22Tue%2008%3A00%22%2C%20%22Tue%2009%3A00%22%2C%20%22Tue%2010%3A00%22%2C%20%22Tue%2011%3A00%22%2C%20%3CBR%20%2F%3E%22Tue%2012%3A00%22%2C%20%22Tue%2013%3A00%22%2C%20%22Tue%2014%3A00%22%2C%20%22Tue%2015%3A00%22%2C%20%22Tue%2016%3A00%22%2C%20%22Tue%2017%3A00%22%2C%20%3CBR%20%2F%3E%22Tue%2018%3A00%22%2C%20%22Tue%2019%3A00%22%2C%20%22Tue%2020%3A00%22%2C%20%22Tue%2021%3A00%22%2C%20%22Tue%2022%3A00%22%2C%20%22Tue%2023%3A00%22%2C%20%3CBR%20%2F%3E%22Wed%2000%3A00%22%2C%20%22Wed%2001%3A00%22%2C%20%22Wed%2002%3A00%22%2C%20%22Wed%2003%3A00%22%2C%20%22Wed%2004%3A00%22%2C%20%22Wed%2005%3A00%22%2C%20%3CBR%20%2F%3E%22Wed%2006%3A00%22%2C%20%22Wed%2007%3A00%22%2C%20%22Wed%2008%3A00%22%2C%20%22Wed%2009%3A00%22%2C%20%22Wed%2010%3A00%22%2C%20%22Wed%2011%3A00%22%2C%20%3CBR%20%2F%3E%22Wed%2012%3A00%22%2C%20%22Wed%2013%3A00%22%2C%20%22Wed%2014%3A00%22%2C%20%22Wed%2015%3A00%22%2C%20%22Wed%2016%3A00%22%2C%20%22Wed%2017%3A00%22%2C%20%3CBR%20%2F%3E%22Wed%2018%3A00%22%2C%20%22Wed%2019%3A00%22%2C%20%22Wed%2020%3A00%22%2C%20%22Wed%2021%3A00%22%2C%20%22Wed%2022%3A00%22%2C%20%22Wed%2023%3A00%22%2C%20%3CBR%20%2F%3E%22Thu%2000%3A00%22%2C%20%22Thu%2001%3A00%22%2C%20%22Thu%2002%3A00%22%2C%20%22Thu%2003%3A00%22%2C%20%22Thu%2004%3A00%22%2C%20%22Thu%2005%3A00%22%2C%20%3CBR%20%2F%3E%22Thu%2006%3A00%22%2C%20%22Thu%2007%3A00%22%2C%20%22Thu%2008%3A00%22%2C%20%22Thu%2009%3A00%22%2C%20%22Thu%2010%3A00%22%2C%20%22Thu%2011%3A00%22%2C%20%3CBR%20%2F%3E%22Thu%2012%3A00%22%2C%20%22Thu%2013%3A00%22%2C%20%22Thu%2014%3A00%22%2C%20%22Thu%2015%3A00%22%2C%20%22Thu%2016%3A00%22%2C%20%22Thu%2017%3A00%22%2C%20%3CBR%20%2F%3E%22Thu%2018%3A00%22%2C%20%22Thu%2019%3A00%22%2C%20%22Thu%2020%3A00%22%2C%20%22Thu%2021%3A00%22%2C%20%22Thu%2022%3A00%22%2C%20%22Thu%2023%3A00%22%2C%20%3CBR%20%2F%3E%22Fri%2000%3A00%22%2C%20%22Fri%2001%3A00%22%2C%20%22Fri%2002%3A00%22%2C%20%22Fri%2003%3A00%22%2C%20%22Fri%2004%3A00%22%2C%20%22Fri%2005%3A00%22%2C%20%3CBR%20%2F%3E%22Fri%2006%3A00%22%2C%20%22Fri%2007%3A00%22%2C%20%22Fri%2008%3A00%22%2C%20%22Fri%2009%3A00%22%2C%20%22Fri%2010%3A00%22%2C%20%22Fri%2011%3A00%22%2C%20%3CBR%20%2F%3E%22Fri%2012%3A00%22%2C%20%22Fri%2013%3A00%22%2C%20%22Fri%2014%3A00%22%2C%20%22Fri%2015%3A00%22%2C%20%22Fri%2016%3A00%22%2C%20%22Fri%2017%3A00%22%2C%20%3CBR%20%2F%3E%22Fri%2018%3A00%22%2C%20%22Fri%2019%3A00%22%2C%20%22Fri%2020%3A00%22%2C%20%22Fri%2021%3A00%22%2C%20%22Fri%2022%3A00%22%2C%20%22Fri%2023%3A00%22%2C%20%3CBR%20%2F%3E%22Sat%2000%3A00%22%2C%20%22Sat%2001%3A00%22%2C%20%22Sat%2002%3A00%22%2C%20%22Sat%2003%3A00%22%2C%20%22Sat%2004%3A00%22%2C%20%22Sat%2005%3A00%22%2C%20%3CBR%20%2F%3E%22Sat%2006%3A00%22%2C%20%22Sat%2007%3A00%22%2C%20%22Sat%2008%3A00%22%2C%20%22Sat%2009%3A00%22%2C%20%22Sat%2010%3A00%22%2C%20%22Sat%2011%3A00%22%2C%20%3CBR%20%2F%3E%22Sat%2012%3A00%22%2C%20%22Sat%2013%3A00%22%2C%20%22Sat%2014%3A00%22%2C%20%22Sat%2015%3A00%22%2C%20%22Sat%2016%3A00%22%2C%20%22Sat%2017%3A00%22%2C%20%3CBR%20%2F%3E%22Sat%2018%3A00%22%2C%20%22Sat%2019%3A00%22%2C%20%22Sat%2020%3A00%22%2C%20%22Sat%2021%3A00%22%2C%20%22Sat%2022%3A00%22%2C%20%22Sat%2023%3A00%22%2C%20%3CBR%20%2F%3E%22Sun%2000%3A00%22%2C%20%22Sun%2001%3A00%22%2C%20%22Sun%2002%3A00%22%2C%20%22Sun%2003%3A00%22%2C%20%22Sun%2004%3A00%22%2C%20%22Sun%2005%3A00%22%2C%20%3CBR%20%2F%3E%22Sun%2006%3A00%22%2C%20%22Sun%2007%3A00%22%2C%20%22Sun%2008%3A00%22%2C%20%22Sun%2009%3A00%22%2C%20%22Sun%2010%3A00%22%2C%20%22Sun%2011%3A00%22%2C%20%3CBR%20%2F%3E%22Sun%2012%3A00%22%2C%20%22Sun%2013%3A00%22%2C%20%22Sun%2014%3A00%22%2C%20%22Sun%2015%3A00%22%2C%20%22Sun%2016%3A00%22%2C%20%22Sun%2017%3A00%22%2C%20%3CBR%20%2F%3E%22Sun%2018%3A00%22%2C%20%22Sun%2019%3A00%22%2C%20%22Sun%2020%3A00%22%2C%20%22Sun%2021%3A00%22%2C%20%22Sun%2022%3A00%22%2C%20%22Sun%2023%3A00%22%20%3CBR%20%2F%3E%5D%2C%20%3CBR%20%2F%3E%22type%22%3A%20%22string%22%2C%20%3CBR%20%2F%3E%22defaultValue%22%3A%20null%2C%20%3CBR%20%2F%3E%22metadata%22%3A%20%7B%20%3CBR%20%2F%3E%22description%22%3A%20%22The%20start%20of%20the%20maintenance%20(Mon%2C%20Tue%2C%20Wed%2C%20Thu%2C%20Fri%2C%20Sat%20or%20Sun%20HH%3Amm)%20schedule%20of%20the%20resource%20for%20Maintenance%20Window%20Start%20tag.%22%20%3CBR%20%2F%3E%7D%20%3CBR%20%2F%3E%7D%2C%20%3CBR%20%2F%3E%22maintenanceWindowEndTag%22%3A%20%7B%20%3CBR%20%2F%3E%22allowedValues%22%3A%20%5B%20%3CBR%20%2F%3Enull%2C%20%3CBR%20%2F%3E%22Mon%2000%3A00%22%2C%20%22Mon%2001%3A00%22%2C%20%22Mon%2002%3A00%22%2C%20%22Mon%2003%3A00%22%2C%20%22Mon%2004%3A00%22%2C%20%22Mon%2005%3A00%22%2C%20%3CBR%20%2F%3E%22Mon%2006%3A00%22%2C%20%22Mon%2007%3A00%22%2C%20%22Mon%2008%3A00%22%2C%20%22Mon%2009%3A00%22%2C%20%22Mon%2010%3A00%22%2C%20%22Mon%2011%3A00%22%2C%20%3CBR%20%2F%3E%22Mon%2012%3A00%22%2C%20%22Mon%2013%3A00%22%2C%20%22Mon%2014%3A00%22%2C%20%22Mon%2015%3A00%22%2C%20%22Mon%2016%3A00%22%2C%20%22Mon%2017%3A00%22%2C%20%3CBR%20%2F%3E%22Mon%2018%3A00%22%2C%20%22Mon%2019%3A00%22%2C%20%22Mon%2020%3A00%22%2C%20%22Mon%2021%3A00%22%2C%20%22Mon%2022%3A00%22%2C%20%22Mon%2023%3A00%22%2C%20%3CBR%20%2F%3E%22Tue%2000%3A00%22%2C%20%22Tue%2001%3A00%22%2C%20%22Tue%2002%3A00%22%2C%20%22Tue%2003%3A00%22%2C%20%22Tue%2004%3A00%22%2C%20%22Tue%2005%3A00%22%2C%20%3CBR%20%2F%3E%22Tue%2006%3A00%22%2C%20%22Tue%2007%3A00%22%2C%20%22Tue%2008%3A00%22%2C%20%22Tue%2009%3A00%22%2C%20%22Tue%2010%3A00%22%2C%20%22Tue%2011%3A00%22%2C%20%3CBR%20%2F%3E%22Tue%2012%3A00%22%2C%20%22Tue%2013%3A00%22%2C%20%22Tue%2014%3A00%22%2C%20%22Tue%2015%3A00%22%2C%20%22Tue%2016%3A00%22%2C%20%22Tue%2017%3A00%22%2C%20%3CBR%20%2F%3E%22Tue%2018%3A00%22%2C%20%22Tue%2019%3A00%22%2C%20%22Tue%2020%3A00%22%2C%20%22Tue%2021%3A00%22%2C%20%22Tue%2022%3A00%22%2C%20%22Tue%2023%3A00%22%2C%20%3CBR%20%2F%3E%22Wed%2000%3A00%22%2C%20%22Wed%2001%3A00%22%2C%20%22Wed%2002%3A00%22%2C%20%22Wed%2003%3A00%22%2C%20%22Wed%2004%3A00%22%2C%20%22Wed%2005%3A00%22%2C%20%3CBR%20%2F%3E%22Wed%2006%3A00%22%2C%20%22Wed%2007%3A00%22%2C%20%22Wed%2008%3A00%22%2C%20%22Wed%2009%3A00%22%2C%20%22Wed%2010%3A00%22%2C%20%22Wed%2011%3A00%22%2C%20%3CBR%20%2F%3E%22Wed%2012%3A00%22%2C%20%22Wed%2013%3A00%22%2C%20%22Wed%2014%3A00%22%2C%20%22Wed%2015%3A00%22%2C%20%22Wed%2016%3A00%22%2C%20%22Wed%2017%3A00%22%2C%20%3CBR%20%2F%3E%22Wed%2018%3A00%22%2C%20%22Wed%2019%3A00%22%2C%20%22Wed%2020%3A00%22%2C%20%22Wed%2021%3A00%22%2C%20%22Wed%2022%3A00%22%2C%20%22Wed%2023%3A00%22%2C%20%3CBR%20%2F%3E%22Thu%2000%3A00%22%2C%20%22Thu%2001%3A00%22%2C%20%22Thu%2002%3A00%22%2C%20%22Thu%2003%3A00%22%2C%20%22Thu%2004%3A00%22%2C%20%22Thu%2005%3A00%22%2C%20%3CBR%20%2F%3E%22Thu%2006%3A00%22%2C%20%22Thu%2007%3A00%22%2C%20%22Thu%2008%3A00%22%2C%20%22Thu%2009%3A00%22%2C%20%22Thu%2010%3A00%22%2C%20%22Thu%2011%3A00%22%2C%20%3CBR%20%2F%3E%22Thu%2012%3A00%22%2C%20%22Thu%2013%3A00%22%2C%20%22Thu%2014%3A00%22%2C%20%22Thu%2015%3A00%22%2C%20%22Thu%2016%3A00%22%2C%20%22Thu%2017%3A00%22%2C%20%3CBR%20%2F%3E%22Thu%2018%3A00%22%2C%20%22Thu%2019%3A00%22%2C%20%22Thu%2020%3A00%22%2C%20%22Thu%2021%3A00%22%2C%20%22Thu%2022%3A00%22%2C%20%22Thu%2023%3A00%22%2C%20%3CBR%20%2F%3E%22Fri%2000%3A00%22%2C%20%22Fri%2001%3A00%22%2C%20%22Fri%2002%3A00%22%2C%20%22Fri%2003%3A00%22%2C%20%22Fri%2004%3A00%22%2C%20%22Fri%2005%3A00%22%2C%20%3CBR%20%2F%3E%22Fri%2006%3A00%22%2C%20%22Fri%2007%3A00%22%2C%20%22Fri%2008%3A00%22%2C%20%22Fri%2009%3A00%22%2C%20%22Fri%2010%3A00%22%2C%20%22Fri%2011%3A00%22%2C%20%3CBR%20%2F%3E%22Fri%2012%3A00%22%2C%20%22Fri%2013%3A00%22%2C%20%22Fri%2014%3A00%22%2C%20%22Fri%2015%3A00%22%2C%20%22Fri%2016%3A00%22%2C%20%22Fri%2017%3A00%22%2C%20%3CBR%20%2F%3E%22Fri%2018%3A00%22%2C%20%22Fri%2019%3A00%22%2C%20%22Fri%2020%3A00%22%2C%20%22Fri%2021%3A00%22%2C%20%22Fri%2022%3A00%22%2C%20%22Fri%2023%3A00%22%2C%20%3CBR%20%2F%3E%22Sat%2000%3A00%22%2C%20%22Sat%2001%3A00%22%2C%20%22Sat%2002%3A00%22%2C%20%22Sat%2003%3A00%22%2C%20%22Sat%2004%3A00%22%2C%20%22Sat%2005%3A00%22%2C%20%3CBR%20%2F%3E%22Sat%2006%3A00%22%2C%20%22Sat%2007%3A00%22%2C%20%22Sat%2008%3A00%22%2C%20%22Sat%2009%3A00%22%2C%20%22Sat%2010%3A00%22%2C%20%22Sat%2011%3A00%22%2C%20%3CBR%20%2F%3E%22Sat%2012%3A00%22%2C%20%22Sat%2013%3A00%22%2C%20%22Sat%2014%3A00%22%2C%20%22Sat%2015%3A00%22%2C%20%22Sat%2016%3A00%22%2C%20%22Sat%2017%3A00%22%2C%20%3CBR%20%2F%3E%22Sat%2018%3A00%22%2C%20%22Sat%2019%3A00%22%2C%20%22Sat%2020%3A00%22%2C%20%22Sat%2021%3A00%22%2C%20%22Sat%2022%3A00%22%2C%20%22Sat%2023%3A00%22%2C%20%3CBR%20%2F%3E%22Sun%2000%3A00%22%2C%20%22Sun%2001%3A00%22%2C%20%22Sun%2002%3A00%22%2C%20%22Sun%2003%3A00%22%2C%20%22Sun%2004%3A00%22%2C%20%22Sun%2005%3A00%22%2C%20%3CBR%20%2F%3E%22Sun%2006%3A00%22%2C%20%22Sun%2007%3A00%22%2C%20%22Sun%2008%3A00%22%2C%20%22Sun%2009%3A00%22%2C%20%22Sun%2010%3A00%22%2C%20%22Sun%2011%3A00%22%2C%20%3CBR%20%2F%3E%22Sun%2012%3A00%22%2C%20%22Sun%2013%3A00%22%2C%20%22Sun%2014%3A00%22%2C%20%22Sun%2015%3A00%22%2C%20%22Sun%2016%3A00%22%2C%20%22Sun%2017%3A00%22%2C%20%3CBR%20%2F%3E%22Sun%2018%3A00%22%2C%20%22Sun%2019%3A00%22%2C%20%22Sun%2020%3A00%22%2C%20%22Sun%2021%3A00%22%2C%20%22Sun%2022%3A00%22%2C%20%22Sun%2023%3A00%22%20%3CBR%20%2F%3E%5D%2C%20%3CBR%20%2F%3E%22type%22%3A%20%22string%22%2C%20%3CBR%20%2F%3E%22defaultValue%22%3A%20null%2C%20%3CBR%20%2F%3E%22metadata%22%3A%20%7B%20%3CBR%20%2F%3E%22description%22%3A%20%22The%20end%20of%20the%20maintenance%20(Mon%2C%20Tue%2C%20Wed%2C%20Thu%2C%20Fri%2C%20Sat%20or%20Sun%20HH%3Amm)%20schedule%20of%20the%20resource%20for%20Maintenance%20Window%20End%20tag.%22%20%3CBR%20%2F%3E%7D%20%3CBR%20%2F%3E%7D%2C%20%3CBR%20%2F%3E%22expirationDateTag%22%3A%20%7B%20%3CBR%20%2F%3E%22type%22%3A%20%22string%22%2C%20%3CBR%20%2F%3E%22defaultValue%22%3A%20%22yyyy-MM-dd%20HH%3Amm%3Ass%22%2C%20%3CBR%20%2F%3E%22metadata%22%3A%20%7B%20%3CBR%20%2F%3E%22description%22%3A%20%22The%20expiration%20(yyyy-MM-dd%20HH%3Amm%3Ass)%20schedule%20of%20the%20resource%20for%20Expiration%20Date%20tag.%22%20%3CBR%20%2F%3E%7D%20%3CBR%20%2F%3E%7D%20%3CBR%20%2F%3E%7D%2C%20%3CBR%20%2F%3E%22variables%22%3A%20%7B%7D%2C%20%3CBR%20%2F%3E%22resources%22%3A%20%5B%20%3CBR%20%2F%3E%7B%20%3CBR%20%2F%3E%22comments%22%3A%20%22Creates%20the%20virtual%20machine.%22%2C%20%3CBR%20%2F%3E%22type%22%3A%20%22Microsoft.Compute%2FvirtualMachines%22%2C%20%3CBR%20%2F%3E%22name%22%3A%20%22%5Bparameters('virtualMachineName')%5D%22%2C%20%3CBR%20%2F%3E%22apiVersion%22%3A%20%222015-06-15%22%2C%20%3CBR%20%2F%3E%22location%22%3A%20%22%5BresourceGroup().location%5D%22%2C%20%3CBR%20%2F%3E%22tags%22%3A%20%7B%20%3CBR%20%2F%3E%22ResourceOwner%22%3A%20%22%5Bparameters('resourceOwnerNameTag')%5D%22%2C%20%3CBR%20%2F%3E%22BusinessUnit%22%3A%20%22%5Bparameters('businessUnitTag')%5D%22%2C%20%3CBR%20%2F%3E%22CostCenter%22%3A%20%22%5Bparameters('costCenterTag')%5D%22%2C%20%3CBR%20%2F%3E%22Environment%22%3A%20%22%5Bparameters('environmentTag')%5D%22%2C%20%3CBR%20%2F%3E%22MaintenanceWindowStart%22%3A%20%22%5Bparameters('maintenanceWindowStartTag')%5D%22%2C%20%3CBR%20%2F%3E%22MaintenanceWindowEnd%22%3A%20%22%5Bparameters('maintenanceWindowEndTag')%5D%22%2C%20%3CBR%20%2F%3E%22ExpirationDate%22%3A%20%22%5Bparameters('expirationDateTag')%5D%22%20%3CBR%20%2F%3E%7D%2C%20%3CBR%20%2F%3E%22properties%22%3A%20%7B%20%3CBR%20%2F%3E%22hardwareProfile%22%3A%20%7B%20%3CBR%20%2F%3E%22vmSize%22%3A%20%22%5Bparameters('virtualMachineSize')%5D%22%20%3CBR%20%2F%3E%7D%2C%20%3CBR%20%2F%3E%22storageProfile%22%3A%20%7B%20%3CBR%20%2F%3E%22imageReference%22%3A%20%7B%20%3CBR%20%2F%3E%22publisher%22%3A%20%22MicrosoftWindowsServer%22%2C%20%3CBR%20%2F%3E%22offer%22%3A%20%22WindowsServer%22%2C%20%3CBR%20%2F%3E%22sku%22%3A%20%22%5Bparameters('virtualMachineSKU')%5D%22%2C%20%3CBR%20%2F%3E%22version%22%3A%20%22latest%22%20%3CBR%20%2F%3E%7D%2C%20%3CBR%20%2F%3E%22osDisk%22%3A%20%7B%20%3CBR%20%2F%3E%22name%22%3A%20%22OperatingSystem%22%2C%20%3CBR%20%2F%3E%22createOption%22%3A%20%22FromImage%22%2C%20%3CBR%20%2F%3E%22vhd%22%3A%20%7B%20%3CBR%20%2F%3E%22uri%22%3A%20%22%5Bconcat('https'%2C%20'%3A%2F%2F'%2C%20parameters('storageAccountsName')%2C%20'.blob.core.windows.net'%2C%20concat('%2Fvhds%2F'%2C%20parameters('virtualMachineName')%2C'_OperatingSystem.vhd'))%5D%22%20%3CBR%20%2F%3E%7D%2C%20%3CBR%20%2F%3E%22caching%22%3A%20%22ReadWrite%22%20%3CBR%20%2F%3E%7D%2C%20%3CBR%20%2F%3E%22dataDisks%22%3A%20%5B%20%3CBR%20%2F%3E%7B%20%3CBR%20%2F%3E%22name%22%3A%20%22Data%22%2C%20%3CBR%20%2F%3E%22diskSizeGB%22%3A%20%22%5Bparameters('virtualMachineDataDiskSize')%5D%22%2C%20%3CBR%20%2F%3E%22lun%22%3A%200%2C%20%3CBR%20%2F%3E%22vhd%22%3A%20%7B%20%3CBR%20%2F%3E%22uri%22%3A%20%22%5Bconcat('https'%2C%20'%3A%2F%2F'%2C%20parameters('storageAccountsName')%2C%20'.blob.core.windows.net'%2C%20concat('%2Fvhds%2F'%2C%20parameters('virtualMachineName')%2C'_Data.vhd'))%5D%22%20%3CBR%20%2F%3E%7D%2C%20%3CBR%20%2F%3E%22createOption%22%3A%20%22Empty%22%20%3CBR%20%2F%3E%7D%20%3CBR%20%2F%3E%5D%20%3CBR%20%2F%3E%7D%2C%20%3CBR%20%2F%3E%22osProfile%22%3A%20%7B%20%3CBR%20%2F%3E%22computerName%22%3A%20%22%5Bparameters('virtualMachineName')%5D%22%2C%20%3CBR%20%2F%3E%22adminUsername%22%3A%20%22%5Bparameters('virtualMachineAdminUsername')%5D%22%2C%20%3CBR%20%2F%3E%22adminPassword%22%3A%20%22%5Bparameters('virtualMachineAdminPassword')%5D%22%2C%20%3CBR%20%2F%3E%22windowsConfiguration%22%3A%20%7B%20%3CBR%20%2F%3E%22provisionVMAgent%22%3A%20true%2C%20%3CBR%20%2F%3E%22enableAutomaticUpdates%22%3A%20true%20%3CBR%20%2F%3E%7D%2C%20%3CBR%20%2F%3E%22secrets%22%3A%20%5B%5D%20%3CBR%20%2F%3E%7D%2C%20%3CBR%20%2F%3E%22networkProfile%22%3A%20%7B%20%3CBR%20%2F%3E%22networkInterfaces%22%3A%20%5B%20%3CBR%20%2F%3E%7B%20%3CBR%20%2F%3E%22id%22%3A%20%22%5BresourceId('Microsoft.Network%2FnetworkInterfaces'%2C%20parameters('virtualMachineNetworkInterfacesName'))%5D%22%20%3CBR%20%2F%3E%7D%20%3CBR%20%2F%3E%5D%20%3CBR%20%2F%3E%7D%20%3CBR%20%2F%3E%7D%2C%20%3CBR%20%2F%3E%22resources%22%3A%20%5B%5D%2C%20%3CBR%20%2F%3E%22dependsOn%22%3A%20%5B%20%3CBR%20%2F%3E%22%5BresourceId('Microsoft.Storage%2FstorageAccounts'%2C%20parameters('storageAccountsName'))%5D%22%2C%20%3CBR%20%2F%3E%22%5BresourceId('Microsoft.Network%2FnetworkInterfaces'%2C%20parameters('virtualMachineNetworkInterfacesName'))%5D%22%20%3CBR%20%2F%3E%5D%20%3CBR%20%2F%3E%7D%2C%20%3CBR%20%2F%3E%7B%20%3CBR%20%2F%3E%22comments%22%3A%20%22Creates%20the%20network%20interfaces%20for%20the%20virtual%20machine.%22%2C%20%3CBR%20%2F%3E%22type%22%3A%20%22Microsoft.Network%2FnetworkInterfaces%22%2C%20%3CBR%20%2F%3E%22name%22%3A%20%22%5Bparameters('virtualMachineNetworkInterfacesName')%5D%22%2C%20%3CBR%20%2F%3E%22apiVersion%22%3A%20%222016-03-30%22%2C%20%3CBR%20%2F%3E%22location%22%3A%20%22%5BresourceGroup().location%5D%22%2C%20%3CBR%20%2F%3E%22tags%22%3A%20%7B%20%3CBR%20%2F%3E%22ResourceOwner%22%3A%20%22%5Bparameters('resourceOwnerNameTag')%5D%22%2C%20%3CBR%20%2F%3E%22BusinessUnit%22%3A%20%22%5Bparameters('businessUnitTag')%5D%22%2C%20%3CBR%20%2F%3E%22CostCenter%22%3A%20%22%5Bparameters('costCenterTag')%5D%22%2C%20%3CBR%20%2F%3E%22Environment%22%3A%20%22%5Bparameters('environmentTag')%5D%22%2C%20%3CBR%20%2F%3E%22MaintenanceWindowStart%22%3A%20%22%5Bparameters('maintenanceWindowStartTag')%5D%22%2C%20%3CBR%20%2F%3E%22MaintenanceWindowEnd%22%3A%20%22%5Bparameters('maintenanceWindowEndTag')%5D%22%2C%20%3CBR%20%2F%3E%22ExpirationDate%22%3A%20%22%5Bparameters('expirationDateTag')%5D%22%20%3CBR%20%2F%3E%7D%2C%20%3CBR%20%2F%3E%22properties%22%3A%20%7B%20%3CBR%20%2F%3E%22ipConfigurations%22%3A%20%5B%20%3CBR%20%2F%3E%7B%20%3CBR%20%2F%3E%22name%22%3A%20%22ipconfig1%22%2C%20%3CBR%20%2F%3E%22properties%22%3A%20%7B%20%3CBR%20%2F%3E%22privateIPAllocationMethod%22%3A%20%22Dynamic%22%2C%20%3CBR%20%2F%3E%22publicIPAddress%22%3A%20%7B%20%3CBR%20%2F%3E%22id%22%3A%20%22%5BresourceId('Microsoft.Network%2FpublicIPAddresses'%2C%20parameters('virtualMachinePublicIPAddressesName'))%5D%22%20%3CBR%20%2F%3E%7D%2C%20%3CBR%20%2F%3E%22subnet%22%3A%20%7B%20%3CBR%20%2F%3E%22id%22%3A%20%22%5Bconcat(resourceId('Microsoft.Network%2FvirtualNetworks'%2C%20parameters('virtualNetworksName'))%2C%20'%2Fsubnets%2F'%2C%20parameters('virtualNetworkSubnetName'))%5D%22%20%3CBR%20%2F%3E%7D%20%3CBR%20%2F%3E%7D%20%3CBR%20%2F%3E%7D%20%3CBR%20%2F%3E%5D%2C%20%3CBR%20%2F%3E%22dnsSettings%22%3A%20%7B%20%3CBR%20%2F%3E%22dnsServers%22%3A%20%5B%5D%20%3CBR%20%2F%3E%7D%2C%20%3CBR%20%2F%3E%22enableIPForwarding%22%3A%20false%20%3CBR%20%2F%3E%7D%2C%20%3CBR%20%2F%3E%22resources%22%3A%20%5B%5D%2C%20%3CBR%20%2F%3E%22dependsOn%22%3A%20%5B%20%3CBR%20%2F%3E%22%5BresourceId('Microsoft.Network%2FpublicIPAddresses'%2C%20parameters('virtualMachinePublicIPAddressesName'))%5D%22%2C%20%3CBR%20%2F%3E%22%5BresourceId('Microsoft.Network%2FvirtualNetworks'%2C%20parameters('virtualNetworksName'))%5D%22%20%3CBR%20%2F%3E%5D%20%3CBR%20%2F%3E%7D%2C%20%3CBR%20%2F%3E%7B%20%3CBR%20%2F%3E%22comments%22%3A%20%22Creates%20the%20public%20IP%20addresses%20for%20the%20virtual%20machine.%22%2C%20%3CBR%20%2F%3E%22type%22%3A%20%22Microsoft.Network%2FpublicIPAddresses%22%2C%20%3CBR%20%2F%3E%22name%22%3A%20%22%5Bparameters('virtualMachinePublicIPAddressesName')%5D%22%2C%20%3CBR%20%2F%3E%22apiVersion%22%3A%20%222016-03-30%22%2C%20%3CBR%20%2F%3E%22location%22%3A%20%22%5BresourceGroup().location%5D%22%2C%20%3CBR%20%2F%3E%22tags%22%3A%20%7B%20%3CBR%20%2F%3E%22ResourceOwner%22%3A%20%22%5Bparameters('resourceOwnerNameTag')%5D%22%2C%20%3CBR%20%2F%3E%22BusinessUnit%22%3A%20%22%5Bparameters('businessUnitTag')%5D%22%2C%20%3CBR%20%2F%3E%22CostCenter%22%3A%20%22%5Bparameters('costCenterTag')%5D%22%2C%20%3CBR%20%2F%3E%22Environment%22%3A%20%22%5Bparameters('environmentTag')%5D%22%2C%20%3CBR%20%2F%3E%22MaintenanceWindowStart%22%3A%20%22%5Bparameters('maintenanceWindowStartTag')%5D%22%2C%20%3CBR%20%2F%3E%22MaintenanceWindowEnd%22%3A%20%22%5Bparameters('maintenanceWindowEndTag')%5D%22%2C%20%3CBR%20%2F%3E%22ExpirationDate%22%3A%20%22%5Bparameters('expirationDateTag')%5D%22%20%3CBR%20%2F%3E%7D%2C%20%3CBR%20%2F%3E%22properties%22%3A%20%7B%20%3CBR%20%2F%3E%22publicIPAllocationMethod%22%3A%20%22Dynamic%22%2C%20%3CBR%20%2F%3E%22idleTimeoutInMinutes%22%3A%204%20%3CBR%20%2F%3E%7D%2C%20%3CBR%20%2F%3E%22resources%22%3A%20%5B%5D%2C%20%3CBR%20%2F%3E%22dependsOn%22%3A%20%5B%5D%20%3CBR%20%2F%3E%7D%2C%20%3CBR%20%2F%3E%7B%20%3CBR%20%2F%3E%22comments%22%3A%20%22Creates%20the%20virtual%20networks%20for%20the%20environment.%22%2C%20%3CBR%20%2F%3E%22type%22%3A%20%22Microsoft.Network%2FvirtualNetworks%22%2C%20%3CBR%20%2F%3E%22name%22%3A%20%22%5Bparameters('virtualNetworksName')%5D%22%2C%20%3CBR%20%2F%3E%22apiVersion%22%3A%20%222016-03-30%22%2C%20%3CBR%20%2F%3E%22location%22%3A%20%22%5BresourceGroup().location%5D%22%2C%20%3CBR%20%2F%3E%22tags%22%3A%20%7B%20%3CBR%20%2F%3E%22ResourceOwner%22%3A%20%22%5Bparameters('resourceOwnerNameTag')%5D%22%2C%20%3CBR%20%2F%3E%22BusinessUnit%22%3A%20%22%5Bparameters('businessUnitTag')%5D%22%2C%20%3CBR%20%2F%3E%22CostCenter%22%3A%20%22%5Bparameters('costCenterTag')%5D%22%2C%20%3CBR%20%2F%3E%22Environment%22%3A%20%22%5Bparameters('environmentTag')%5D%22%2C%20%3CBR%20%2F%3E%22MaintenanceWindowStart%22%3A%20%22%5Bparameters('maintenanceWindowStartTag')%5D%22%2C%20%3CBR%20%2F%3E%22MaintenanceWindowEnd%22%3A%20%22%5Bparameters('maintenanceWindowEndTag')%5D%22%2C%20%3CBR%20%2F%3E%22ExpirationDate%22%3A%20%22%5Bparameters('expirationDateTag')%5D%22%20%3CBR%20%2F%3E%7D%2C%20%3CBR%20%2F%3E%22properties%22%3A%20%7B%20%3CBR%20%2F%3E%22addressSpace%22%3A%20%7B%20%3CBR%20%2F%3E%22addressPrefixes%22%3A%20%5B%20%3CBR%20%2F%3E%22%5Bparameters('virtualNetworkAddressPrefix')%5D%22%20%3CBR%20%2F%3E%5D%20%3CBR%20%2F%3E%7D%2C%20%3CBR%20%2F%3E%22subnets%22%3A%20%5B%20%3CBR%20%2F%3E%7B%20%3CBR%20%2F%3E%22name%22%3A%20%22%5Bparameters('virtualNetworkSubnetName')%5D%22%2C%20%3CBR%20%2F%3E%22properties%22%3A%20%7B%20%3CBR%20%2F%3E%22addressPrefix%22%3A%20%22%5Bparameters('virtualNetworkSubnetAddressPrefix')%5D%22%20%3CBR%20%2F%3E%7D%20%3CBR%20%2F%3E%7D%20%3CBR%20%2F%3E%5D%20%3CBR%20%2F%3E%7D%2C%20%3CBR%20%2F%3E%22resources%22%3A%20%5B%5D%2C%20%3CBR%20%2F%3E%22dependsOn%22%3A%20%5B%5D%20%3CBR%20%2F%3E%7D%2C%20%3CBR%20%2F%3E%7B%20%3CBR%20%2F%3E%22comments%22%3A%20%22Creates%20the%20storage%20account%20to%20store%20the%20virtual%20machine.%22%2C%20%3CBR%20%2F%3E%22type%22%3A%20%22Microsoft.Storage%2FstorageAccounts%22%2C%20%3CBR%20%2F%3E%22sku%22%3A%20%7B%20%3CBR%20%2F%3E%22name%22%3A%20%22Standard_LRS%22%2C%20%3CBR%20%2F%3E%22tier%22%3A%20%22Standard%22%20%3CBR%20%2F%3E%7D%2C%20%3CBR%20%2F%3E%22kind%22%3A%20%22Storage%22%2C%20%3CBR%20%2F%3E%22name%22%3A%20%22%5Bparameters('storageAccountsName')%5D%22%2C%20%3CBR%20%2F%3E%22apiVersion%22%3A%20%222016-01-01%22%2C%20%3CBR%20%2F%3E%22location%22%3A%20%22%5BresourceGroup().location%5D%22%2C%20%3CBR%20%2F%3E%22tags%22%3A%20%7B%20%3CBR%20%2F%3E%22ResourceOwner%22%3A%20%22%5Bparameters('resourceOwnerNameTag')%5D%22%2C%20%3CBR%20%2F%3E%22BusinessUnit%22%3A%20%22%5Bparameters('businessUnitTag')%5D%22%2C%20%3CBR%20%2F%3E%22CostCenter%22%3A%20%22%5Bparameters('costCenterTag')%5D%22%2C%20%3CBR%20%2F%3E%22Environment%22%3A%20%22%5Bparameters('environmentTag')%5D%22%2C%20%3CBR%20%2F%3E%22MaintenanceWindowStart%22%3A%20%22%5Bparameters('maintenanceWindowStartTag')%5D%22%2C%20%3CBR%20%2F%3E%22MaintenanceWindowEnd%22%3A%20%22%5Bparameters('maintenanceWindowEndTag')%5D%22%2C%20%3CBR%20%2F%3E%22ExpirationDate%22%3A%20%22%5Bparameters('expirationDateTag')%5D%22%20%3CBR%20%2F%3E%7D%2C%20%3CBR%20%2F%3E%22properties%22%3A%20%7B%7D%2C%20%3CBR%20%2F%3E%22resources%22%3A%20%5B%5D%2C%20%3CBR%20%2F%3E%22dependsOn%22%3A%20%5B%5D%20%3CBR%20%2F%3E%7D%20%3CBR%20%2F%3E%5D%20%3CBR%20%2F%3E%7D%20%3CBR%20%2F%3E%5B%2Fcode%5D%20%3CBR%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3E2.%20Select%20Deploy%20on%20the%20Template%20that%20you%20have%20just%20created%20in%20Azure%20Templates%20with%20the%20copied%20JSON%20code%20%3CBR%20%2F%3E%3CBR%20%2F%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F73439iA23022C9E62A4341%22%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3E3.%20Select%20Purchase%20and%20wait%20for%20the%20deployment%20to%20complete%20successfully%20%3CBR%20%2F%3E%3CBR%20%2F%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F73440i32CC7607B4C45807%22%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3E4.%20Once%20the%20deployment%20has%20succeeded%2C%20select%20the%20virtual%20machine%20in%20the%20resource%20group%20%3CBR%20%2F%3E%3CBR%20%2F%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F73441i1878D2C43942DBB1%22%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3E5.%20Select%20the%20Connect%20button%20to%20download%20a%20*.RDP%20file%20from%20Azure%20%3CBR%20%2F%3E%3CBR%20%2F%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F73442i553F93919EFC3A4F%22%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3E6.%20Open%20or%20launch%20the%20*.RDP%20file%20%3CBR%20%2F%3E%3CBR%20%2F%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F73443iD74CA95E7B54FB08%22%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3E7.%20Login%20with%20your%20newly%20deployed%20virtual%20machine's%20local%20admin%20credential%20%3CBR%20%2F%3E%3CBR%20%2F%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F73444i20D15284B1F16367%22%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3E8.%20Accept%20the%20newly%20deployed%20virtual%20machine%20self-signed%20certificate%20to%20establish%20the%20Remote%20Desktop%20connection%20with%20your%20machine%20%3CBR%20%2F%3E%3CBR%20%2F%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F73445i885370F8BA6AD989%22%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSTRONG%3EConclusion%20%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CBR%20%2F%3EVoila.%20As%20you%20can%20see%2C%20it%20is%20really%20that%20simple%20and%20easy%20to%20perform%20a%20virtual%20machine%20deployment%20using%20a%20well-defined%20template.%20With%20that%2C%20you%20can%20hand%20this%20template%20to%20any%20developer%20to%20perform%20self-deployment%20of%20a%20virtual%20machine%20in%20Azure%20that%20can%20be%20consistent%2C%20dependable%20and%20repeatable%20for%20development%20or%20testing.%20And%20the%20best%20part%20is%20that%20you%20can%20delete%20it%20away%20and%20re-provision%20the%20virtual%20machine%20again%20with%20ease%20constantly.%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F73446iE34A20937E000EB0%22%20%2F%3E%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20%3CSTRONG%3E%20Additional%20Resources%20%3C%2FSTRONG%3E%20%3CBR%20%2F%3E%3CUL%3E%3CBR%20%2F%3E%3CLI%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fvirtual-machines%2Fwindows%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3E%20Azure%20Documentation%20-%20Windows%20Virtual%20Machines%20%3C%2FA%3E%3C%2FLI%3E%3CBR%20%2F%3E%3CLI%3E%3CA%20href%3D%22https%3A%2F%2Fazure.microsoft.com%2Fen-gb%2Fresources%2Fvideos%2Findex%2F%3Fservices%3Dvirtual-machines%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3E%20Azure%20Videos%20-%20Virtual%20Machine%20%3C%2FA%3E%3C%2FLI%3E%3CBR%20%2F%3E%3CLI%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Frest%2Fapi%2Fcompute%2Fvirtualmachines%2Fvirtualmachines-rest-api%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3E%20Azure%20Virtual%20Machines%20REST%20API%20Reference%20%3C%2FA%3E%3C%2FLI%3E%3CBR%20%2F%3E%3C%2FUL%3E%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20%3CSTRONG%3E%20See%20Also%20%3C%2FSTRONG%3E%20%3CBR%20%2F%3E%3CUL%3E%3CBR%20%2F%3E%3CLI%3E%3CA%20href%3D%22https%3A%2F%2Fblogs.msdn.microsoft.com%2Fazuredev%2F2017%2F02%2F11%2Fiac-on-azure-an-introduction-of-infrastructure-as-code-iac-with-azure-resource-manager-arm-template%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3E%20An%20introduction%20of%20Infrastructure%20as%20Code%20(IaC)%20with%20Azure%20Resource%20Manager%20(ARM)%20Template%20%3C%2FA%3E%3C%2FLI%3E%3CBR%20%2F%3E%3CLI%3EWindows%20Server%20Virtual%20Machine%20Deployment%20made%20easy%20with%20ARM%20Template%3C%2FLI%3E%3CBR%20%2F%3E%3CLI%3E%3CA%20href%3D%22https%3A%2F%2Fblogs.msdn.microsoft.com%2Fazuredev%2F2017%2F03%2F11%2Fiac-on-azure-linux-virtual-machine-deployment-in-a-breeze-with-arm-template%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3E%20Linux%20Virtual%20Machine%20Deployment%20in%20a%20breeze%20with%20ARM%20Template%20%3C%2FA%3E%3C%2FLI%3E%3CBR%20%2F%3E%3CLI%3E%3CA%20href%3D%22https%3A%2F%2Fblogs.msdn.microsoft.com%2Fazuredev%2F2017%2F04%2F08%2Fiac-on-azure-developing-arm-template-using-vscode-efficiently%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3E%20Developing%20ARM%20Template%20using%20VSCode%20efficiently%20%3C%2FA%3E%3C%2FLI%3E%3CBR%20%2F%3E%3CLI%3E%3CA%20href%3D%22https%3A%2F%2Fblogs.msdn.microsoft.com%2Fazuredev%2F2017%2F05%2F06%2Fiac-on-azure-how-to-get-started-with-arm-template%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3E%20How%20to%20get%20started%20with%20ARM%20Template%20%3C%2FA%3E%3C%2FLI%3E%3CBR%20%2F%3E%3C%2FUL%3E%3CBR%20%2F%3E%20%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-336204%22%20slang%3D%22en-US%22%3EFirst%20published%20on%20MSDN%20on%20Feb%2025%2C%202017%20Authored%20by%20Ryen%20Tang2%20weeks%20ago%2C%20I%20touched%20on%20the%20topic%20of%20Infrastructure%20as%20Code%20(IaC)%2C%20their%20benefits%20and%20an%20example%20on%20how%20to%20consistently%20create%20an%20Azure%20resource%20group%20for%20deploying%20a%20virtual%20network%20with%20a%20set%20of%20subnets%20and%20a%20gateway%20subnet.%3C%2FLINGO-TEASER%3E
First published on MSDN on Feb 25, 2017

Authored by Ryen Tang




2 weeks ago, I touched on the topic of Infrastructure as Code (IaC), their benefits and an example on how to consistently create an Azure resource group for deploying a virtual network with a set of subnets and a gateway subnet.

As a continuation of the previous An introduction to Infrastructure as Code (IaC) using Azure Resource Manager (ARM) Template , I will be sharing with you on using Template to consistently create an Azure resource group for deploying a virtual machine with an independent virtual network subnet, and attach a public IP address for remote desktop connection to the virtual machine in the cloud.

Before we begin, it will be advisable to view the previous blog post on how to create a template within Azure Templates service for those that have not view the last blog post. That previous blog post will explain on how to implement the JSON code below where you will have to copy, paste it into the newly created template name (Eg. iaas_virtual_machine_windowserver_v1 ) of your choice, save it and select deploy.

Since I am creating a generic ARM template that must be able to deploy the different types of VM size in all region, the following JSON code will only contain VM Size of A0-A7, D1_v2-D15_v2 and F1-F16 series based on the list in Products available by region . If you are interested in the differences between the different types of VM Size, you can refer to this Sizes for Windows virtual machines in Azure document for more details.



Let us begin...



1. Copy the JSON code below, paste it into the new ARM Template and save it

[code language="js" collapse="true" title="Windows Server ARM Template JSON Code (Click to Expand)"]
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"virtualNetworksName": {
"type": "string",
"defaultValue": null,
"metadata": {
"description": "The name of the virtual network for the virtual machine."
}
},
"virtualNetworkAddressPrefix": {
"type": "string",
"defaultValue": null,
"minLength": 9,
"maxLength": 18,
"metadata": {
"description": "The IP addresses prefixes for the virtual network. (Eg. 10.1.0.0/16 )"
}
},
"virtualNetworkSubnetName": {
"type": "string",
"defaultValue": null,
"metadata": {
"description": "The name of the virtual network subnet. (Eg. Subnet-Dev )"
}
},
"virtualNetworkSubnetAddressPrefix": {
"type": "string",
"defaultValue": null,
"minLength": 9,
"maxLength": 18,
"metadata": {
"description": "The IP addresses prefixes for the virtual network. (Eg. 10.1.1.0/24 )"
}
},
"storageAccountsName": {
"type": "string",
"defaultValue": null,
"minLength": 3,
"maxLength": 24,
"metadata": {
"description": "The name of the storage account for storing the virtual machine."
}
},
"virtualMachineName": {
"type": "string",
"defaultValue": null,
"metadata": {
"description": "The name of the virtual machine."
}
},
"virtualMachineSize": {
"type": "string",
"allowedValues": [
"Standard_A0", "Standard_A1", "Standard_A2", "Standard_A3",
"Standard_A4", "Standard_A5", "Standard_A6", "Standard_A7",

"Standard_D1_v2", "Standard_D2_v2", "Standard_D3_v2", "Standard_D4_v2",
"Standard_D5_v2", "Standard_D6_v2", "Standard_D7_v2", "Standard_D8_v2",
"Standard_D9_v2", "Standard_D10_v2", "Standard_D11_v2", "Standard_D12_v2",
"Standard_D13_v2", "Standard_D14_v2", "Standard_D15_v2",

"Standard_F1", "Standard_F2", "Standard_F4", "Standard_F8", "Standard_F16"
],
"defaultValue": "Standard_A0",
"metadata": {
"description": "The size of the virtual machine."
}
},
"virtualMachineDataDiskSize": {
"type": "int",
"defaultValue": 40,
"minValue": 10,
"maxValue": 1023,
"metadata": {
"description": "The GB size of the data disk for the virtual machine."
}
},
"virtualMachineSKU":{
"type": "string",
"allowedValues": [
"2008-R2-SP1",
"2008-R2-SP1-BYOL",
"2012-Datacenter",
"2012-Datacenter-BYOL",
"2012-R2-Datacenter",
"2012-R2-Datacenter-BYOL",
"2016-Datacenter",
"2016-Datacenter-with-Containers",
"2016-Nano-Server"
],
"defaultValue": "2016-Datacenter",
"metadata": {
"description": "The SKU of the Windows Server virtual machine."
}
},
"virtualMachineNetworkInterfacesName": {
"type": "string",
"defaultValue": null,
"metadata": {
"description": "The name of the network interface for the virtual machine."
}
},
"virtualMachinePublicIPAddressesName": {
"type": "string",
"defaultValue": null,
"metadata": {
"description": "The name of the public IP addresses for the virtual machine."
}
},
"virtualMachineAdminUsername": {
"type": "string",
"defaultValue": null,
"metadata": {
"description": "The administrator username for the virtual machine."
}
},
"virtualMachineAdminPassword": {
"type": "securestring",
"defaultValue": null,
"metadata": {
"description": "The administrator password for the virtual machine."
}
},
"resourceOwnerNameTag": {
"type": "string",
"defaultValue": null,
"metadata": {
"description": "The name of the resource owner for the Owner Name tag."
}
},
"businessUnitTag": {
"type": "string",
"defaultValue": null,
"metadata": {
"description": "The name of the department for the Business Unit tag."
}
},
"costCenterTag": {
"type": "string",
"defaultValue": null,
"metadata": {
"description": "A cost identifier for the Cost Center tag."
}
},
"environmentTag": {
"allowedValues": [
null,
"Development",
"Staging",
"Production"
],
"type": "string",
"defaultValue": null,
"metadata": {
"description": "The name for the Environment tag."
}
},
"maintenanceWindowStartTag": {
"allowedValues": [
null,
"Mon 00:00", "Mon 01:00", "Mon 02:00", "Mon 03:00", "Mon 04:00", "Mon 05:00",
"Mon 06:00", "Mon 07:00", "Mon 08:00", "Mon 09:00", "Mon 10:00", "Mon 11:00",
"Mon 12:00", "Mon 13:00", "Mon 14:00", "Mon 15:00", "Mon 16:00", "Mon 17:00",
"Mon 18:00", "Mon 19:00", "Mon 20:00", "Mon 21:00", "Mon 22:00", "Mon 23:00",
"Tue 00:00", "Tue 01:00", "Tue 02:00", "Tue 03:00", "Tue 04:00", "Tue 05:00",
"Tue 06:00", "Tue 07:00", "Tue 08:00", "Tue 09:00", "Tue 10:00", "Tue 11:00",
"Tue 12:00", "Tue 13:00", "Tue 14:00", "Tue 15:00", "Tue 16:00", "Tue 17:00",
"Tue 18:00", "Tue 19:00", "Tue 20:00", "Tue 21:00", "Tue 22:00", "Tue 23:00",
"Wed 00:00", "Wed 01:00", "Wed 02:00", "Wed 03:00", "Wed 04:00", "Wed 05:00",
"Wed 06:00", "Wed 07:00", "Wed 08:00", "Wed 09:00", "Wed 10:00", "Wed 11:00",
"Wed 12:00", "Wed 13:00", "Wed 14:00", "Wed 15:00", "Wed 16:00", "Wed 17:00",
"Wed 18:00", "Wed 19:00", "Wed 20:00", "Wed 21:00", "Wed 22:00", "Wed 23:00",
"Thu 00:00", "Thu 01:00", "Thu 02:00", "Thu 03:00", "Thu 04:00", "Thu 05:00",
"Thu 06:00", "Thu 07:00", "Thu 08:00", "Thu 09:00", "Thu 10:00", "Thu 11:00",
"Thu 12:00", "Thu 13:00", "Thu 14:00", "Thu 15:00", "Thu 16:00", "Thu 17:00",
"Thu 18:00", "Thu 19:00", "Thu 20:00", "Thu 21:00", "Thu 22:00", "Thu 23:00",
"Fri 00:00", "Fri 01:00", "Fri 02:00", "Fri 03:00", "Fri 04:00", "Fri 05:00",
"Fri 06:00", "Fri 07:00", "Fri 08:00", "Fri 09:00", "Fri 10:00", "Fri 11:00",
"Fri 12:00", "Fri 13:00", "Fri 14:00", "Fri 15:00", "Fri 16:00", "Fri 17:00",
"Fri 18:00", "Fri 19:00", "Fri 20:00", "Fri 21:00", "Fri 22:00", "Fri 23:00",
"Sat 00:00", "Sat 01:00", "Sat 02:00", "Sat 03:00", "Sat 04:00", "Sat 05:00",
"Sat 06:00", "Sat 07:00", "Sat 08:00", "Sat 09:00", "Sat 10:00", "Sat 11:00",
"Sat 12:00", "Sat 13:00", "Sat 14:00", "Sat 15:00", "Sat 16:00", "Sat 17:00",
"Sat 18:00", "Sat 19:00", "Sat 20:00", "Sat 21:00", "Sat 22:00", "Sat 23:00",
"Sun 00:00", "Sun 01:00", "Sun 02:00", "Sun 03:00", "Sun 04:00", "Sun 05:00",
"Sun 06:00", "Sun 07:00", "Sun 08:00", "Sun 09:00", "Sun 10:00", "Sun 11:00",
"Sun 12:00", "Sun 13:00", "Sun 14:00", "Sun 15:00", "Sun 16:00", "Sun 17:00",
"Sun 18:00", "Sun 19:00", "Sun 20:00", "Sun 21:00", "Sun 22:00", "Sun 23:00"
],
"type": "string",
"defaultValue": null,
"metadata": {
"description": "The start of the maintenance (Mon, Tue, Wed, Thu, Fri, Sat or Sun HH:mm) schedule of the resource for Maintenance Window Start tag."
}
},
"maintenanceWindowEndTag": {
"allowedValues": [
null,
"Mon 00:00", "Mon 01:00", "Mon 02:00", "Mon 03:00", "Mon 04:00", "Mon 05:00",
"Mon 06:00", "Mon 07:00", "Mon 08:00", "Mon 09:00", "Mon 10:00", "Mon 11:00",
"Mon 12:00", "Mon 13:00", "Mon 14:00", "Mon 15:00", "Mon 16:00", "Mon 17:00",
"Mon 18:00", "Mon 19:00", "Mon 20:00", "Mon 21:00", "Mon 22:00", "Mon 23:00",
"Tue 00:00", "Tue 01:00", "Tue 02:00", "Tue 03:00", "Tue 04:00", "Tue 05:00",
"Tue 06:00", "Tue 07:00", "Tue 08:00", "Tue 09:00", "Tue 10:00", "Tue 11:00",
"Tue 12:00", "Tue 13:00", "Tue 14:00", "Tue 15:00", "Tue 16:00", "Tue 17:00",
"Tue 18:00", "Tue 19:00", "Tue 20:00", "Tue 21:00", "Tue 22:00", "Tue 23:00",
"Wed 00:00", "Wed 01:00", "Wed 02:00", "Wed 03:00", "Wed 04:00", "Wed 05:00",
"Wed 06:00", "Wed 07:00", "Wed 08:00", "Wed 09:00", "Wed 10:00", "Wed 11:00",
"Wed 12:00", "Wed 13:00", "Wed 14:00", "Wed 15:00", "Wed 16:00", "Wed 17:00",
"Wed 18:00", "Wed 19:00", "Wed 20:00", "Wed 21:00", "Wed 22:00", "Wed 23:00",
"Thu 00:00", "Thu 01:00", "Thu 02:00", "Thu 03:00", "Thu 04:00", "Thu 05:00",
"Thu 06:00", "Thu 07:00", "Thu 08:00", "Thu 09:00", "Thu 10:00", "Thu 11:00",
"Thu 12:00", "Thu 13:00", "Thu 14:00", "Thu 15:00", "Thu 16:00", "Thu 17:00",
"Thu 18:00", "Thu 19:00", "Thu 20:00", "Thu 21:00", "Thu 22:00", "Thu 23:00",
"Fri 00:00", "Fri 01:00", "Fri 02:00", "Fri 03:00", "Fri 04:00", "Fri 05:00",
"Fri 06:00", "Fri 07:00", "Fri 08:00", "Fri 09:00", "Fri 10:00", "Fri 11:00",
"Fri 12:00", "Fri 13:00", "Fri 14:00", "Fri 15:00", "Fri 16:00", "Fri 17:00",
"Fri 18:00", "Fri 19:00", "Fri 20:00", "Fri 21:00", "Fri 22:00", "Fri 23:00",
"Sat 00:00", "Sat 01:00", "Sat 02:00", "Sat 03:00", "Sat 04:00", "Sat 05:00",
"Sat 06:00", "Sat 07:00", "Sat 08:00", "Sat 09:00", "Sat 10:00", "Sat 11:00",
"Sat 12:00", "Sat 13:00", "Sat 14:00", "Sat 15:00", "Sat 16:00", "Sat 17:00",
"Sat 18:00", "Sat 19:00", "Sat 20:00", "Sat 21:00", "Sat 22:00", "Sat 23:00",
"Sun 00:00", "Sun 01:00", "Sun 02:00", "Sun 03:00", "Sun 04:00", "Sun 05:00",
"Sun 06:00", "Sun 07:00", "Sun 08:00", "Sun 09:00", "Sun 10:00", "Sun 11:00",
"Sun 12:00", "Sun 13:00", "Sun 14:00", "Sun 15:00", "Sun 16:00", "Sun 17:00",
"Sun 18:00", "Sun 19:00", "Sun 20:00", "Sun 21:00", "Sun 22:00", "Sun 23:00"
],
"type": "string",
"defaultValue": null,
"metadata": {
"description": "The end of the maintenance (Mon, Tue, Wed, Thu, Fri, Sat or Sun HH:mm) schedule of the resource for Maintenance Window End tag."
}
},
"expirationDateTag": {
"type": "string",
"defaultValue": "yyyy-MM-dd HH:mm:ss",
"metadata": {
"description": "The expiration (yyyy-MM-dd HH:mm:ss) schedule of the resource for Expiration Date tag."
}
}
},
"variables": {},
"resources": [
{
"comments": "Creates the virtual machine.",
"type": "Microsoft.Compute/virtualMachines",
"name": "[parameters('virtualMachineName')]",
"apiVersion": "2015-06-15",
"location": "[resourceGroup().location]",
"tags": {
"ResourceOwner": "[parameters('resourceOwnerNameTag')]",
"BusinessUnit": "[parameters('businessUnitTag')]",
"CostCenter": "[parameters('costCenterTag')]",
"Environment": "[parameters('environmentTag')]",
"MaintenanceWindowStart": "[parameters('maintenanceWindowStartTag')]",
"MaintenanceWindowEnd": "[parameters('maintenanceWindowEndTag')]",
"ExpirationDate": "[parameters('expirationDateTag')]"
},
"properties": {
"hardwareProfile": {
"vmSize": "[parameters('virtualMachineSize')]"
},
"storageProfile": {
"imageReference": {
"publisher": "MicrosoftWindowsServer",
"offer": "WindowsServer",
"sku": "[parameters('virtualMachineSKU')]",
"version": "latest"
},
"osDisk": {
"name": "OperatingSystem",
"createOption": "FromImage",
"vhd": {
"uri": "[concat('https', '://', parameters('storageAccountsName'), '.blob.core.windows.net', concat('/vhds/', parameters('virtualMachineName'),'_OperatingSystem.vhd'))]"
},
"caching": "ReadWrite"
},
"dataDisks": [
{
"name": "Data",
"diskSizeGB": "[parameters('virtualMachineDataDiskSize')]",
"lun": 0,
"vhd": {
"uri": "[concat('https', '://', parameters('storageAccountsName'), '.blob.core.windows.net', concat('/vhds/', parameters('virtualMachineName'),'_Data.vhd'))]"
},
"createOption": "Empty"
}
]
},
"osProfile": {
"computerName": "[parameters('virtualMachineName')]",
"adminUsername": "[parameters('virtualMachineAdminUsername')]",
"adminPassword": "[parameters('virtualMachineAdminPassword')]",
"windowsConfiguration": {
"provisionVMAgent": true,
"enableAutomaticUpdates": true
},
"secrets": []
},
"networkProfile": {
"networkInterfaces": [
{
"id": "[resourceId('Microsoft.Network/networkInterfaces', parameters('virtualMachineNetworkInterfacesName'))]"
}
]
}
},
"resources": [],
"dependsOn": [
"[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccountsName'))]",
"[resourceId('Microsoft.Network/networkInterfaces', parameters('virtualMachineNetworkInterfacesName'))]"
]
},
{
"comments": "Creates the network interfaces for the virtual machine.",
"type": "Microsoft.Network/networkInterfaces",
"name": "[parameters('virtualMachineNetworkInterfacesName')]",
"apiVersion": "2016-03-30",
"location": "[resourceGroup().location]",
"tags": {
"ResourceOwner": "[parameters('resourceOwnerNameTag')]",
"BusinessUnit": "[parameters('businessUnitTag')]",
"CostCenter": "[parameters('costCenterTag')]",
"Environment": "[parameters('environmentTag')]",
"MaintenanceWindowStart": "[parameters('maintenanceWindowStartTag')]",
"MaintenanceWindowEnd": "[parameters('maintenanceWindowEndTag')]",
"ExpirationDate": "[parameters('expirationDateTag')]"
},
"properties": {
"ipConfigurations": [
{
"name": "ipconfig1",
"properties": {
"privateIPAllocationMethod": "Dynamic",
"publicIPAddress": {
"id": "[resourceId('Microsoft.Network/publicIPAddresses', parameters('virtualMachinePublicIPAddressesName'))]"
},
"subnet": {
"id": "[concat(resourceId('Microsoft.Network/virtualNetworks', parameters('virtualNetworksName')), '/subnets/', parameters('virtualNetworkSubnetName'))]"
}
}
}
],
"dnsSettings": {
"dnsServers": []
},
"enableIPForwarding": false
},
"resources": [],
"dependsOn": [
"[resourceId('Microsoft.Network/publicIPAddresses', parameters('virtualMachinePublicIPAddressesName'))]",
"[resourceId('Microsoft.Network/virtualNetworks', parameters('virtualNetworksName'))]"
]
},
{
"comments": "Creates the public IP addresses for the virtual machine.",
"type": "Microsoft.Network/publicIPAddresses",
"name": "[parameters('virtualMachinePublicIPAddressesName')]",
"apiVersion": "2016-03-30",
"location": "[resourceGroup().location]",
"tags": {
"ResourceOwner": "[parameters('resourceOwnerNameTag')]",
"BusinessUnit": "[parameters('businessUnitTag')]",
"CostCenter": "[parameters('costCenterTag')]",
"Environment": "[parameters('environmentTag')]",
"MaintenanceWindowStart": "[parameters('maintenanceWindowStartTag')]",
"MaintenanceWindowEnd": "[parameters('maintenanceWindowEndTag')]",
"ExpirationDate": "[parameters('expirationDateTag')]"
},
"properties": {
"publicIPAllocationMethod": "Dynamic",
"idleTimeoutInMinutes": 4
},
"resources": [],
"dependsOn": []
},
{
"comments": "Creates the virtual networks for the environment.",
"type": "Microsoft.Network/virtualNetworks",
"name": "[parameters('virtualNetworksName')]",
"apiVersion": "2016-03-30",
"location": "[resourceGroup().location]",
"tags": {
"ResourceOwner": "[parameters('resourceOwnerNameTag')]",
"BusinessUnit": "[parameters('businessUnitTag')]",
"CostCenter": "[parameters('costCenterTag')]",
"Environment": "[parameters('environmentTag')]",
"MaintenanceWindowStart": "[parameters('maintenanceWindowStartTag')]",
"MaintenanceWindowEnd": "[parameters('maintenanceWindowEndTag')]",
"ExpirationDate": "[parameters('expirationDateTag')]"
},
"properties": {
"addressSpace": {
"addressPrefixes": [
"[parameters('virtualNetworkAddressPrefix')]"
]
},
"subnets": [
{
"name": "[parameters('virtualNetworkSubnetName')]",
"properties": {
"addressPrefix": "[parameters('virtualNetworkSubnetAddressPrefix')]"
}
}
]
},
"resources": [],
"dependsOn": []
},
{
"comments": "Creates the storage account to store the virtual machine.",
"type": "Microsoft.Storage/storageAccounts",
"sku": {
"name": "Standard_LRS",
"tier": "Standard"
},
"kind": "Storage",
"name": "[parameters('storageAccountsName')]",
"apiVersion": "2016-01-01",
"location": "[resourceGroup().location]",
"tags": {
"ResourceOwner": "[parameters('resourceOwnerNameTag')]",
"BusinessUnit": "[parameters('businessUnitTag')]",
"CostCenter": "[parameters('costCenterTag')]",
"Environment": "[parameters('environmentTag')]",
"MaintenanceWindowStart": "[parameters('maintenanceWindowStartTag')]",
"MaintenanceWindowEnd": "[parameters('maintenanceWindowEndTag')]",
"ExpirationDate": "[parameters('expirationDateTag')]"
},
"properties": {},
"resources": [],
"dependsOn": []
}
]
}
[/code]



2. Select Deploy on the Template that you have just created in Azure Templates with the copied JSON code





3. Select Purchase and wait for the deployment to complete successfully





4. Once the deployment has succeeded, select the virtual machine in the resource group





5. Select the Connect button to download a *.RDP file from Azure





6. Open or launch the *.RDP file





7. Login with your newly deployed virtual machine's local admin credential





8. Accept the newly deployed virtual machine self-signed certificate to establish the Remote Desktop connection with your machine





Conclusion

Voila. As you can see, it is really that simple and easy to perform a virtual machine deployment using a well-defined template. With that, you can hand this template to any developer to perform self-deployment of a virtual machine in Azure that can be consistent, dependable and repeatable for development or testing. And the best part is that you can delete it away and re-provision the virtual machine again with ease constantly.







Additional Resources




See Also