EUC Synchronization with Universal Sync Script
  • Dark
  • PDF

EUC Synchronization with Universal Sync Script

  • Dark
  • PDF


Synchronizing your EUC environment with ControlUp has become easier than ever before, with our new Universal Sync Script. This script lets you synchronize your VMware Horizon, CVAD or Citrix Cloud environment with ControlUp so that you can view your VDI machines or connection servers as managed machines. You can use a Scheduled Trigger or a Windows task to automatically trigger the execution of the script so that your ControlUp environment synchronizes the latest changes in your EUC infrastructure.

In this article, we walk you through the configuration and functionality of the script. By the end you will have learned how to automate your EUC synchronization with ControlUp.

How you benefit

  • Faster synchronization
  • Less overhead as no external APIs are needed. The data is pulled from the ControlUp Monitors via the Powershell Monitor API cmdlets that were introduced in version 8.6.5
  • Automatic update via the script library


  • ControlUp version 8.6.5
  • EUC environments added to the ControlUp organization tree. This can be either VMware Horizon, CVAD or Citrix Cloud
  • A running ControlUp Monitor machine
  • The monitor machine must be able to resolve the FQDN of EUC machines.

Script arguments

Argument Description Value
FolderPath Defines the destination path in the Real-Time Console. Make sure that the path is not "EUC Environments" as it will entirely delete the EUC extension from your ControlUp environment String
AddBrokers Indicates if CVAD Brokers, Citrix Cloud Connectors or Horizon Connection Servers should be synchronized Yes / No
Exclude Machine names that you want to exclude. You can define a comma-separated list with wildcards (). For example: mac, serv* will not synchronize machines that start with "mac" and "serv" String
Delete Folders or machines that do not exist anymore will be cleaned up Yes / No
Preview If set to "Yes", the EUC synchronization will be simulated. If set to Yes, no changes are committed to the Real-Time Console Yes / No
VerbosDebug If set to "Yes", the log level will be set to Verbose. Verbose output provides detailed information on the EUC synchronization process. Yes / No
SaveConfig Defines if the configuration file should be saved. This is needed only when have to make changes to the configuration file Yes / No


  • The sync script downloaded as a PowerShell file. You can download the script from here. Alternatively, download the ZIP file containing the script and XML file. The XML file is used to import the script to the console.
  • A running ControlUp Monitor server
  • PowerShell execution policy on the monitor server:
    • Bypass or
    • Unrestricted
  • A service account that has the following permissions:
    • Local Administrator privileges
    • Log on as a batch job user right
    • Password never changes attribute
  • User actions to be allowed in the ControlUp Security Policy:
    * Add Machine
    * Remove Machine
    * Add Folder
    * Remove Folder

Step 1: Create the configuration file

The first step is to create the configuration file. This file contains the configuration for each sync script execution. You can create the configuration by either running the EUC Sync Script from the Real-Time Console or you can run the PowerShell command manually. Note that this is a one-time configuration. Perform the instructions in this step

Create the configuration file from the Real-Time Console

  1. Download the EUC Sync Script.xml or use the XML file from the downloaded ZIP archive and save it to the console machine.
  2. In the Real-Time Console, click Script Actions. In the My Draft Scripts tab, click Import and import the EUC Sync Script.xml. After the import, the script is displayed in the My Draft Scripts tab.
  3. Click Modify and open the Settings tab. Set the Execution Context to Other Machine and use Shared Credentials as the user to run the script.
  4. From the Real-Time Console, run the script on a monitor machine. Right-click the monitor machine > Script Actions > Universal EUC Sync Script.
  5. This is a one-time configuration and will be considered every time the sync script is executed (via the Windows Task Scheduler on the monitor machine). For more details, see the script-arguments section. Make sure you set Save Configuration File to Yes.
  6. After executing the SBA, a Universal_EUC_Sync.cfg file is generated in the %ProgramData%\ControlUp\SyncScripts directory.

Create the configuration file from PowerShell

Another way to generate the configuration file is to open a PowerShell session with a user that has administrative rights. Run the following script to create the configuration file. This generates the same file as running the SBA from the Real-Time Console.

.\UniversalEUCSync.ps1 -FolderPath "EUC Environments Sync" -AddBrokers "Yes" -Exclude "No" -Delete "Yes" -Preview "No" -VerbosDebug "No" -SaveConfig "Yes"

Step 2: Set up a Scheduled Task

The next step is to configure a Scheduled Task, which allows you to run the EUC Sync Script on a schedule so that your EUC machines are synchronized to your ControlUp environment automatically.

To create and configure a Scheduled Task:

  1. On the monitor machine, open the Windows Task Scheduler (Start > Run > taskschd.msc)
  2. Select Action > Create Task. Under the General tab, provide the following information:
    • Name. Provide a name for the task.
    • Change User or Group. Select the service account that should run the task.
    • Select Run whetheruser is logged on or not.
    • Select Run with highest privileges
  3. Under Triggers, click New to create a trigger scheduler. We recommend the following values:
    • Start Date. Start date of the task.
    • Select Daily.
    • Set Repeat task every to 1 hour
  4. Under Action, click New to create an action.
    • Program/script: powershell.exe
    • Add arguments (optional): Task argument to call the script. For example: -File "UniversalEUCSync.ps1".
    • Start in (optional): Folder where the script is located. For example: C:\Scripts. Make sure you don't use double quotation marks here.
  5. Click OK and enter the user information for running the task.
  6. Once the synchronization is complete, you can see the updated organization tree.

Remap folders

This advanced configuration lets you map folders and machines to sites. All you need to do is to define a pattern which applies to machine names or folder paths and to provide the name of the site.

  1. Open the sitemap.cfg file located in %ProgramData%\ControlUp\SyncScripts.
  2. Add the pattern that you want to apply. Add a comma as a separator, followed by the name of the site.
  • Add machines with the pattern LA-CU-Win10p01" to site "Los Angeles"
    LA*WIN10, Los Angeles
  • Add a folder path, such as EUC\NY to site "New York"
    EUC\NY, New York

Adding EUC machines from a different domains

By default, the sync script takes the FQDN of the monitor machine. Assuming that EUC machines are located in a different domain, you need to add the FQDN in the dns_map.cfg file located under %ProgramData%\ControlUp\SyncScripts.

Log File

Log files reside in the %ProgramData%\ControlUp\SyncScripts\Logs directory and are kept for 30 days. Every time the task scheduler runs the script, a new log file is written to this folder. The log file contains information that can help you identify synchronization problems.

Was this article helpful?