Prerequisites for Running Horizon On-Premises Sync Scripts

Before you can use our synchronization scripts to update the ControlUp organization tree with your Horizon on-prem updates, you need to review the prerequisites below.

For information on the sync script itself, see VMware Horizon Sync Scripts.

If you are running Horizon on Azure, see Horizon on Azure Sync to ControlUp.

Prerequisites

To run any of our Horizon scripts, you have to first:

  • Create a credentials file for automated authentication to the Connection Server.
  • Install and configure the VMware PowerCLI.
  • Install the Hv.Helper module (not required by all scripts, but recommended to install).

Create Credentials File

Running our Horizon scripts requires authentication to the Horizon Connection Server. Connecting to a connection server doesn’t use standard pass-through authentication from Active Directory, so you must explicitly pass credentials. We have created a script that creates a credentials file on the ControlUp monitor machine from where these scripts must be run. Our scripts use this credentials file for automatically passing the user's credential to the connection server authentication. 

Note: PSCredentials Objects can only be used by the user that created the object on a specific machine. This means that the user that creates the credentials file must have a user profile on this machine.

To create the credentials file:

  1. Open the ControlUp console and click Script Actions. The Script Management screen appears.

    mceclip21.png

  2. From the Scripts Management screen, type Create credentials for Horizon scripts (1) in the search box and then click Add Script (2).

    Pic12.jpg

  3. Check the box to accept the terms (1), and click Next (2) to continue to the next screen for creating user permissions.

    Pic14.jpg

  4. Grant permissions to user groups that should be able to run the script. Click Add Action to save the settings.

    Pic15.jpg
    After the script is installed, it will appear under the Organization Scripts tab. 

    mceclip0.png

  5. From the ControlUp Real-Console grid, locate the monitor machine where you want the credentials file to be stored. Right-click the machine (1) and type Create in the search box (2). Select the Create credentials for Horizon scripts (3) that you just added and a new prompt appears.

    Pic18.jpg

  6. From the Credentials section, select a user that has a profile and is allowed to run scripts on the monitor machine. This is the user that appears in the XML file name. For example, running the script as cop85.local\sqladmin creates the credential file in the C:\ProgramData\ControlUp\ScriptSupport directory
    SharedCredentials.png

    CreatedCredential.png
    Under Command Line Arguments, enter the user credentials for the user that needs to connect to the Horizon Connection Server. This user must be set up in your VMware environment and the format of the provided user must be domain\username

  7. Click OK and the Action Results Screen appears.
  8. In the Output tab, check that the credentials file was created. The message PSCredential object created and stored in C:\ProgramData\ControlUp\ScriptSupport indicates a successful creation of the file.
    OK.png
    When you open the XML file, you see that the password is encrypted. 
    EncryptedPassword.png

Install and Configure VMware PowerCLI

The VMWare PowerCLI is a feature-rich collection of Powershell modules for interacting with your VMware environment. As our VMware scripts use PowerCLI, it is necessary to have it installed on the machine that runs the scripts (usually the ControlUp Console or the ControlUp Monitor).

There are many ways to get the VMware PowerCLI installed on your machine. In this article, we will explain how to install the PowerCLI from the ControlUp Console.

To install VMware PowerCLI:

  1. In the CU Console, right-click the machine where you want to install the PowerCLI. In the Search Box type PowerCLI (1) > Script Actions (2) > More… (3) > Install VMWare PowerCLI (4).

    Pic24.jpg
  2. Under CEIP Configuration, set True or False, depending on if you want to send data to the VMware Customer Experience Improvement Program (CEIP). By default, PowerCLI stops working when certificates are not signed properly. You can set 3 different values:

    Warn: Shows a warning saying that the certificate is not valid and provides further information about reasons for not considering the certificate. 

    Ignore: A connection is established, ignoring the invalid certificate
    Fail: No connection is established if the certificate is not valid

    Pic29.jpg

Installing Hv.Helper Module

Some of our Horizon scripts use the Hv.Helper Powershell module. Although not all of our scripts require this module, it is recommended to install this module on every machine that is running the ControlUp Console or/and ControlUp Monitor.

Note: Installing this module on your Horizon VMs is not necessary.

 

To install the Hv.Helper module:

  1. Right-click the machine where you want the Horizon scripts to run. In the search box type Hv (1) > Script Actions (2) > More... (3) > Install Hv.Helper module for Horizon View scripts (4).

    mceclip0.png

  2. By default, the script installs the Hv.Helper module only if it does not exist on the target machine. This behavior is set with the False flag, as shown below. If you want to overwrite an already installed module, set the flag to True.

    mceclip1.png

    Alternatively, you can install the Hv.Helper module by following the instructions given in this Github repository
1-on-1 Demo
Schedule now
Price Quote
Get it now
Need a Script?
Get it here
Powered by Zendesk