vRealize Automation (vRA) 6.2 Pre-Req Automation Script (Formerly vCAC)

(vRA) 6.2 Pre-Req Automation 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:

Screenshot 2014-12-09 10.53.31

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. (1) is selected if you already have the file being requested and just need to point the script to the file
  2. (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. (3) will exit the script

If you select (1) and the file is not automatically found, it will prompt you for its location.

Screenshot 2014-12-09 10.53.43

Selecting (2) will do it all for you as you can see below:

Screenshot 2014-12-09 10.54.02

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.

Screenshot 2014-12-09 11.09.24

Choosing Menu item (2) will download the resource kit (~11MB), unzip, and use ntrights.exe.

Screenshot 2014-12-09 11.09.32

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

Screenshot 2014-12-09 11.10.06

Java is then installed. Follow the menu items and continue

Screenshot 2014-12-09 11.10.14

Once Java has been installed, it will also set the Java_HOME variable automatically.

Screenshot 2014-12-09 11.12.23

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.


VMware PowerCLI Blog


Leave a Reply

Your email address will not be published. Required fields are marked *