I’m publishing some of the scripts I have written for VMM. These are each based on specific customer asks or conversations that lead me to go sleepless in trying to solve the problems myself. I am very interested in your feedback, especially if you would like to offer a change to improve efficiency or effectiveness.
Not a lot to this one folks! In fact when I was looking through my scripts library, I was surprised I never published this one in the past. I use this script the most frequently of all.
The goal when I wrote this was to simplify deploying a new VM to as few steps as possible. I have used a lot of static variables in the script so it only asks for a server name. This means your template and profiles need to have already been created. If you want to fancy it up, I would start by prompting the user to input additional values at run time.
In each of the scripts for this series, I have noted any manually assigned variables at the top of the script just under the header. For this script you will want to update your VMM server name.
In each of the scripts for this series, I have added a line to load the VMM snap-in. This way it can be run from any machine, including a workstation, where the VMM console is installed by right clicking on the file and choosing “run”. If you run the script from within VMM you will get a few lines of error text that the snap-in is already loaded. You can either ignore this, or comment out the line if it bothers you.
disclaimer: this script is not supported in any way. I have posted the code rather than the .ps1 file so that you can review it, modify it to make it your own, and test it before trusting it in a production environment. now this is your code, I am not responsible for its use.