---
title: "EUC Synchronization with Universal Sync Script"
slug: "euc-synchronization-with-universal-sync-script"
description: "New Universal Sync Script allows you to synchronize your EUC environment with ControlUp.The data is pulled from the ControlUp Monitors via the that were introduced in version 8.6.5."
updated: 2025-07-02T18:11:22Z
published: 2025-07-02T18:11:22Z
canonical: "support.controlup.com/euc-synchronization-with-universal-sync-script"
---

> ## Documentation Index
> Fetch the complete documentation index at: https://support.controlup.com/llms.txt
> Use this file to discover all available pages before exploring further.

# EUC Synchronization with Universal Sync Script

Synchronizing your EUC environment with ControlUp has become easier than ever before, with our Universal Sync Script. This script lets you synchronize your Omnissa Horizon (formerly VMware Horizon), CVAD or Citrix Cloud environment with ControlUp so that you can view your VDI machines or connection servers as managed machines.

          Built-in Folder Synchronization

          

You can use [built-in synchronization](/tim-reorg/docs/built-in-folder-synchronization) to synchronize your folders and machines without needing to import and configure the Universal Sync Script.

For example, if you connect an Omnissa Horizon environment to ControlUp and you run the sync script, a new folder structure with connection servers, pool machines and RDSH farms is created in the organizational tree. ![Example of a Omnissa folder structure being represented in your ControlUp organization tree under folders.](https://cdn.document360.io/098100b7-b9da-4bea-b4b9-017140ab863e/Images/Documentation/image-AQ2ZUO6Y.png)

Regularly running the script will automatically synchronize EUC environment changes to ControlUp. 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.

## Benefits

- Faster synchronization of your EUC environment.
- Less overhead as no external APIs are needed. The data is pulled from the ControlUp Monitors via the [Powershell Monitor API cmdlets](/tim-reorg/docs/monitor-cluster-powershell-api-cmdlets).
- New script features and enhancements are published in the script library.

## Prerequisites

- You must already have EUC environments added to the ControlUp organization tree. This can be either Omnissa Horizon, CVAD, or Citrix Cloud
- A running ControlUp Monitor machine
- 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](/tim-reorg/docs/security-policy-pane):  

* Add Machine  

* Remove Machine  

* Add Folder  

* Remove Folder

## Script arguments

Configure the script behavior by providing the following parameters:

| Argument | Description | Value |
| --- | --- | --- |
| Folder Path | The new folder path to which your EUC environment will be synchronized. | String |
| Add Brokers | Indicate if CVAD Brokers, Citrix Cloud Connectors or Horizon Connection Servers should be synchronized | Yes / No |
| Exclusions List | Machine names that you want to exclude. You can define a comma-separated list with wildcards (*). **For example:** <font color="red" data-tomark-pass="">mac*, serv* </font>will not synchronize machines that start with either "mac" or "serv". | String |
| Cleanup Folders and Machines | Folders or machines that do not exist anymore will be cleaned up | Yes / No |
| Commit Changes | If set to ***No***, the EUC synchronization will be simulated and no changes are committed to the Real-Time Console | Yes / No |
| Log Path | The log path to which the sync script write the log | Folder path of log file |
| Log Duration | Specifies how long the log file should be retained | Number (in days) |
| VerbosDebug | If set to ***Yes***, verbose output is written to the log file. This provides more detailed information on the synchronization process. | Yes / No |
| Mode | Defines if the script should save the configuration file only ("save") or run the sync process ("run") | Save / Run |

### Manual Downloads

If you prefer to download the XML and the PowerShell script manually, use the links below

- [**Download XML import file**](https://cdn.document360.io/098100b7-b9da-4bea-b4b9-017140ab863e/Images/Documentation/Universal%20EUC%20Sync.xml)  

We recommend importing the sync script by importing this XML file in the console. See Step 2 in the [section below](/tim-reorg/docs/euc-synchronization-with-universal-sync-script#step-1-create-the-configuration-file).
- [**Download PowerShell script**](https://cdn.document360.io/098100b7-b9da-4bea-b4b9-017140ab863e/Images/Documentation/UniversalEUCSync%281%29.ps1)

Although we don't recommend running the PowerShell script manually, you can set up a Windows task running this file.

## Step 1 - Create the Configuration file

Before you can use the sync script, you need to create configuration files. These files contain the configuration that is loaded each time the sync script runs.

          Note

          

If you want to change the configuration, run the script action again with the changes you want to make. To store the configuration, use the value **Set** for the **Mode** parameter.

**To create the configuration file in the console:**

1. [Download the XML](https://cdn.document360.io/098100b7-b9da-4bea-b4b9-017140ab863e/Images/Documentation/Universal%20EUC%20Sync.xml) and save it to the console machine.
2. In the Real-Time Console, click **Script Actions**. In the **My Draft Scripts** tab, and **Import** the downloaded XML. Once imported, the script is displayed in the **My Draft Scripts** tab. ![Universal EUC Sync Script listed in the draft scripts.](https://cdn.document360.io/098100b7-b9da-4bea-b4b9-017140ab863e/Images/Documentation/image-464LO9K9.png)
3. Click **Modify** and open the **Settings** tab. Set the Execution Context to **Other Machine**, select a monitor machine on which you want to run the script, and set the user under **Shared Credentials**. Click **OK**.

          Important

          

You must select a monitor machine, otherwise the script will not work correctly. Ensure the shared credentials belong to a local admin user on the monitor machine, as the user needs to be able to write to the %ProgramData% folder.
4. Create a final version of the script by clicking **Finalize**.
5. In the console, right-click the monitor machine that you configured in Step 3 and run the script. Right-click the monitor machine **> Script Actions > Universal EUC Sync**. ![Right-click action menu on the monitor. The script action 'Universal EUC Sync' is highlighted.](https://cdn.document360.io/098100b7-b9da-4bea-b4b9-017140ab863e/Images/Documentation/image-XFDJWQ15.png)
6. In the script arguments window, configure the script behavior. Make sure you set the **Mode** parameter to **Save**. For the first run of the script, we recommend to set the **Commit Changes** parameter to **No** to simulate the synchronization at the first run. Refer to the [script-arguments](/tim-reorg/docs/euc-synchronization-with-universal-sync-script#script-arguments) section to better understand the meaning of the parameters. ![Mode set to Save in the command line arguments.](https://cdn.document360.io/098100b7-b9da-4bea-b4b9-017140ab863e/Images/Documentation/image-RWHKGJ9G.png)
7. Upon successful execution of the script, the following screen appears: ![Script output window.](https://cdn.document360.io/098100b7-b9da-4bea-b4b9-017140ab863e/Images/Documentation/image-EZFGFA4Q.png)
8. On the monitor machine, a **Universal_EUC_Sync.cfg** file and other configuration files are created under `%ProgramData%\ControlUp\SyncScripts`. ![configuration text files created in the folder specified above.](https://cdn.document360.io/098100b7-b9da-4bea-b4b9-017140ab863e/Images/Documentation/image-QTLGOJAT.png)
9. The **Universal_EUC_Sync.cfg** is the configuration file that holds the basic configuration for the sync script.

## Step 2 - Run the Script

The previous step explained how to create the configuration file. Now it's time to start the synchronization process. Before you can start, you can start a test run.

**Start the test run**

1. Run the script again by right-clicking the monitor machine.
2. Make sure the **Preview** parameter in the cfg file is set to **True**. This allows you to simulate the synchronization process.
3. Once no errors are shown in the output, you can start the synchronization again. Make sure the **Preview** parameter in the cfg file is set to **False**.

For the automatic synchronization, you can use a built-in trigger called [Scheduled Trigger](/tim-reorg/docs/euc-synchronization-with-universal-sync-script#option-1-run-the-script-with-a-scheduled-trigger) or you can run a [Windows Task on the monitor machine](/tim-reorg/docs/euc-synchronization-with-universal-sync-script#option-2-set-up-a-scheduled-task). Both options are explained in more detail below.

### Option 1: Run the Script with a Scheduled Trigger (Recommended)

**To set up a Scheduled Trigger:**

1. In the console, click **Triggers** > **Add Trigger** > **Scheduled**
2. Select the following options and click **Next**
  1. **Record Type**: Machine
  2. **Schedule**: Per Minute
  3. **Recur every** 60 minutes
  4. **End**. Expiry date of the trigger.
3. Keep the trigger condition empty and click **Next**.
4. As a trigger scope, select the folder under which the monitor machine resides. In our example, the hostname of the monitor machine **MONITORSERVER** is located under a customized folder **CU Monitors**. Click **Next**

          Note

          

We recommend adding your ControlUp Monitors to a dedicated folder in the ControlUp organizational tree.

![CU Monitors folder selected in the Scope section.](https://cdn.document360.io/098100b7-b9da-4bea-b4b9-017140ab863e/Images/Documentation/image-2BV9RT8M.png)

1. Click **Add** to add the EUC sync script. ![Add button highlighted.](https://cdn.document360.io/098100b7-b9da-4bea-b4b9-017140ab863e/Images/Documentation/image-WHZK1A1Q.png)
2. Select the **Universal EUC Sync** script, click **Next**.
3. Select the user that should run the script on the monitor machine, click **Finish**.
4. Click **OK** to save the follow-up action.
5. Additionally, you can configure other follow-up actions, such as sending an email alert. In this example, we will focus on the action itself without setting another follow-up action. Click **Next**.
6. Provide a user-friendly **Trigger name** and click **Finish**.
7. In the Trigger Settings, select the new trigger and click **Apply** and then **OK**. ![New trigger selected. The 'Apply' button is highlighted.](https://cdn.document360.io/098100b7-b9da-4bea-b4b9-017140ab863e/Images/Documentation/image-3D0KS9Q2.png)

### Option 2: Set up a Scheduled Task

Another way to automatically trigger the script is by setting up a Windows task which allows you to run the EUC Sync Script on a schedule.

**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.** Name for the task.
  - **Change User or Group**. Service account that should run the task.
  - Select **Run whether user is logged on or not**.
  - Select **Run with highest privileges**  

![Create Task window displaying the configuration described above.](https://cdn.document360.io/098100b7-b9da-4bea-b4b9-017140ab863e/Images/Documentation/image-46GGZUAM.png)
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**  

![New Trigger window displaying the configuration described above.](https://cdn.document360.io/098100b7-b9da-4bea-b4b9-017140ab863e/Images/Documentation/image-EYD9CGSO.png)
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.  

![Edit Action window displaying the configuration described above.](https://cdn.document360.io/098100b7-b9da-4bea-b4b9-017140ab863e/Images/Documentation/image-542LXKW0.png)
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. ![ControlUp Console organization tree and folder structure.](https://cdn.document360.io/098100b7-b9da-4bea-b4b9-017140ab863e/Images/Documentation/image-0PTA7BA1.png)

## Advanced

### Custom Folder Mapping

Use `%ProgramData%\ControlUp\SyncScripts\folder_map.cfg` to customize the folder paths created by the sync scripts, and the folders in which machines are placed.

From version **9.1**, you can use the Real-Time DX Console to map folders or machines to [folder paths](/v1/docs/built-in-folder-synchronization#sync-folder-mappings).

**Map folder paths** Add mapping rules to replace part of the folder path with a new path, separating the old and new paths with a comma (essentially a 'find and replace' operation).

Consider this example:

![line 1 shows 'desktop pools,'. line 2 shows 'Delivery Groups, DGs'. line 3 shows 'Brokers, Machines\Delivery Groups'.](https://cdn.document360.io/098100b7-b9da-4bea-b4b9-017140ab863e/Images/Documentation/FolderMapConfig.png)

- Line 1 removes a folder from the path. `org\EUC\desktop pools\IC` turns into `org\EUC\IC`.
- Line 2 replaces a folder. `org\EUC\Delivery Groups` turns into `org\EUC\DGs`.
- Line 3 replaces a folder and adds a folder. `org\EUC\Brokers` turns into `org\EUC\Machines\Delivery Groups`

**Map machines to folders** Add mapping rules to place machines matching a naming pattern into a specific folder.

Enter the machine naming pattern, using asterisks (*) as wildcards. Add a comma as a separator, followed by the full path of the folder in which to place the machines matching the pattern. The full folder path starts with the root of the sync folder (for example, to place machines in `orgName\EUC Sync\Horizon Machines`, you need to specify `EUC Sync\Horizon Machines` as the folder path).

          You must use an asterisk

          

When you are mapping machines to a folder, you **must** use at least one asterisk for the machine name pattern. The sync script searches for machines only if an asterisk is present in the mapping rule.

Consider this example:

![Line 1 shows '*houston1*,euc\Desktop Pools\Houston01'. Line 2 shows '*houston2*,euc\Desktop Pools\Houston02'.](https://cdn.document360.io/098100b7-b9da-4bea-b4b9-017140ab863e/Images/Documentation/MachineToFolderMapConfig.png)

- Line 1 places all machines with "houston1" somewhere in their name into a folder named "Houston01"
- Line 2 places all machines with "houston2" somewhere in their name into a folder named "Houston02"

### Custom Site Mapping

Use `%ProgramData%\ControlUp\SyncScripts\site_map.cfg` to assign folders or machines to a specific site. Enter the folder path or machine naming pattern (using an asterisk as a wildcard). Add a comma as a separator, followed by the name of a ControlUp site.

From version 9.0, you can use the Real-Time DX Console to map folders or machines to [sites](/v1/docs/built-in-folder-synchronization#sync-site-mappings).

All machines in the folder you specify, or all machines in the folder you specify, will be added to the specified ControlUp site.

Consider this example: ![Line 1 shows 'LA*WIN10, Los Angeles'. Line 2 shows 'EUCY, New York'.](https://cdn.document360.io/098100b7-b9da-4bea-b4b9-017140ab863e/Images/Documentation/image-6QLCH9K4.png)

- Line 1 places all machines matching the pattern LA*WIN10 (such as LA-CU-WIN10p01) to the Los Angeles site.
- Line 2 places all machines in the folder EUC\NY (such as org\EUC\NY\CTX-PVS-01) to the New York site.

### Custom DNS Mapping

Use `%ProgramData%\ControlUp\SyncScripts\dns_map.cfg` to assign a specific DNS entry for folders or machines. Enter the folder path or machine naming pattern (using an asterisk as a wildcard). Add a comma as a separator, followed by the DNS entry.

From version 9.0, you can use the Real-Time DX Console to map folders or machines to [DNS entries](/v1/docs/built-in-folder-synchronization#sync-site-mappings).

Consider this example:

![Line 1 shows 'enderverse-DC*, enderverse.root'. Line 2 shows 'ctx\cloud, cloud.ev.root'.](https://cdn.document360.io/098100b7-b9da-4bea-b4b9-017140ab863e/Images/Documentation/DNSmapConfig.png)

- Line 1 changes the DNS entry for all machines matching the pattern (for example, enderverse-DC01) to enderverse.root
- Line 2 changes the DNS entry for all machines in the folder (for example, org\ctx\cloud\CTX-PVS-01) to cloud.ev.root

### Log File

You can set the log file path and retention period by providing the parameters mentioned in the [previous section](/tim-reorg/docs/euc-synchronization-with-universal-sync-script#script-arguments). By default, 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.
