Posts

Showing posts from May, 2018

Deploy Multiple VMs in Azure using PowerShell

This script will enable the deployment of several virtual machines to Azure in an automated fashion. I already have certain parts of my infrastructure in Azure, such as the virtual network, resource group and a subnet. You will need to create these first before using this script. The scripts deploys a set of Windows Server 2016 data center VMs, these are the steps: Imports the AzureRM module. Prompts for a login for Azure. A function has been created that defines the parameters for the deployment called "Provision-AzureVM", a single parameter has been defined called $VMName. The script then deploys a set of VM's based on the names contained in the array "$VMs" by calling the function as mentioned above. To use the script you need to modify the variables in the function mark under # Variables. You then need to define the names of virtual machines in the VMs array. You could also add more required parameters at the beginning of the function to