- Use PowerShell to minimize the time spent on creating VMs.
- Install ADDS along with the VM creation.
- Use a differencing disk for all the VMs to save disk space.
In the spirit of kickstarting this channel again, I needed to spin up a few Virtual Machines to facilitate PowerShelling. I was going to go through the process of using the Hyper-V management Cmdlets when I stumbled upon the AutomatedLab framework on GitHub (https://github.com/AutomatedLab/AutomatedLab). I had never used this framework before, so a little trial and error was in order.
Kudos to the developers, they have included an assortment of sample Lab scripts that you can easily modify to suit your needs and get going fairly quickly without a lot of hassle. The framework also includes the ability to install some applications like Exchange, SQL and a few others. There are many more features included that I haven’t started playing with yet. It’s worth having a look, particularly if you find yourself doing things like demoing applications or testing GPO settings on a regular basis.
The code I used to spin out my lab is below.