As the Pre-Req Automation Script has been such a hit over the past 12 months I continue to update it for the requirements of each release of vCloud Automation Center and now vRealize Automation. I have received scores of emails and tweets telling me how it saved the users hours of hassle. And so here I am, releasing a Pre-Req Automation Script for vRA 6.2 which is now Generally Available on MyVMware.
The new version can be grabbed from Github HERE. For those that are new to Github you CANNOT just right-click on this link and hit ‘save as’. that will not work. You will want to click on the file, choose “Raw” and copy the script to a .ps1 file on your machine. (There were several comments on my previous blogs about the confusion of downloading the script)
How to use the script
There are a few new options in this script that I added last version, but didn’t take the time to really blog about. So let’s get into it. If the script is run “out of the box” you’ll be presented with something like this:
This menu shows up if the user has not pre-set the script variables before running the script. This is just fine, but you will receive prompts throughout the duration of the script.
Each menu that pops up gives essentially the same options:
- (1) is selected if you already have the file being requested and just need to point the script to the file
- (2) is selected if you do not already have the file and you want the script to go out to the internet and grab it and execute automatically
- (3) will exit the script
If you select (1) and the file is not automatically found, it will prompt you for its location.
Selecting (2) will do it all for you as you can see below:
To set the Secondary Logon Service and Batch Logon requirements, the NTRights.exe file must be used to do this in an automated fashion. This file is only found in the Windows 2003 Resource Kit.
Choosing Menu item (2) will download the resource kit (~11MB), unzip, and use ntrights.exe.
Once the file has been downloaded and extracted, the script will ask for the user account to add to these services. Make sure to follow the example of using host\user_account
Java is then installed. Follow the menu items and continue
Once Java has been installed, it will also set the Java_HOME variable automatically.
The Pre-Reqs are now complete. Much easier than doing it all manually, right? How would you like to have the entire script automated (no menu prompts)? Read on!
If you open the script before running it, you will see a section at the top of the code named “USER CONFIGURATION”
All of the menus options can be set here. Read the comments above each variable and update the variable accordingly. Each variable $_____menuoption are the variables that prompt for how to proceed with each step of the installer. As you can see below, I’ve added “2” to each menu item, meaning I want the script to download each file for me automatically. I don’t want to have to do ANYTHING.
The only other variable I need to populate to have a fully-automated script is the $domainAdminAcct variable needing the account that will be used for the Secondary Logon and Batch Logon services.
Once those are set, you can then run the script, sit back, and spend some time on Twitter or Reddit .