Home > Blogs > VMware PowerCLI Blog


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

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:

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.

Screenshot 2014-12-09 11.13.43

Once those are set, you can then run the script, sit back, and spend some time on Twitter or Reddit Smile.

This entry was posted in Customization, General, vCloud and tagged , , , , on by .
Brian Graf

About Brian Graf

Brian Graf is a Senior Product Manager - Distributed Resource Management (DRS/HA/DPM) at VMware. Previous to Product Management, Brian worked as a Senior Technical Marketing Manager at VMware, focused on PowerCLI Automation and ESXi Lifecycle technologies. Previous roles also include: Consultant for EMC Consulting. His main focus was Data center migration methodologies and implementations. His background previous to VMware includes Operations Engineering, Virtualization, Business Intelligence, and Exchange/Blackberry Engineering. Get notification of new blog postings and more by following Brian on Twitter: @vBrianGraf

12 thoughts on “vRealize Automation (vRA) 6.2 Pre-Req Automation Script (Formerly vCAC)

  1. Pingback: New vCAC & Application Services 6.1 template prep script (linux) | Josh As A Service

  2. Pingback: vRA (vCAC) - Configuring IaaS 6.2 vRealize Automation

  3. Pingback: 19-05-15 | Virtual Fabric

  4. Pingback: vRealize Automation (vRA) 6.2 Pre-Req Automation Script (Formerly vCAC) - IT Tool Box Blog

  5. Pingback: Building an advanced lab using VMware vRealize Automation – Part 9: Deploy and configure the IaaS platform | virtualHobbit

  6. aenagy

    I found that when running this script on Windows Server 2012 R2 I encountered the error “Test-Path : A parameter cannot be found that matches parameter name ‘eq’.” on lines 233, 408 and 490. The fix was to surround the Test-Path statement with round brackets as PowerShell is interpreting “-eq $false” as part of the command and not as a boolean expression. For example:

    From:
    if (($InstallSource -eq “”) -or ( Test-Path -Path “$InstallSource” -ErrorAction SilentlyContinue -eq $false)) {

    To:
    if (($InstallSource -eq “”) -or ( (Test-Path -Path “$InstallSource” -ErrorAction SilentlyContinue) -eq $false)) {

    Reply
  7. Dave Convery

    Brian – Thanks for this! It DOES save tons of work! Is there any way to change the logic around the JAVA_HOME variable? If I use Java 8, then I have to manually reset it.

    Reply
  8. Nicky

    Hey Brian,

    When I run this script, it keep throwing error below and wouldn’t run, am I missing anything, please suggest.

    The ‘<' operator is reserved for future use.
    At C:\tmp\vRA 6.2 PreReq Automation Script.ps1:290 char:114
    + … l_selector=http&protocol_type=clone" class="inline-form js-clone-selector-fo …

    Thanks,

    Reply

Leave a Reply

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

*