Views:

In such cases, you can use agent-initiated activation with specific settings on the DSM to perform an automatic deployment. A PowerShell startup script will be used to install the agent on the machine, which can also function on non-persistent computers.

To enable the agent-initiated activation:

 
Before deploying this procedure in a production environment, please test the settings first in your test environment and make sure it helps you achieve your goal.
  1. Keep the Golden Image (Master Image) template without any Deep Security Agent installed. If needed, clean up the uninstallation as well to ensure that no drivers are left. For the list of files to check, refer to this article: Manually uninstalling Deep Security Agent, Relay, and Notifier from Windows.
  2. Set up the DSM to allow re-activation from known computers.
    1. On the DSM console, navigate to Administration > System Settings.
    2. Click the Agents tab.
    3. Tick Allow Agent-Initiated Activation checkbox and select For Any Computers radio button.
    4. Enable Allow Agent to specify hostname checkbox.
    5. For the section If a computer with the same name already exists, choose Re-activate the existing computer.
    6. Tick Allow reactivation of cloned VMs checkbox.

    Allow re-activation from known computers

  3. Create a deployment script for your machines.
    1. At the upper-right corner of the DSM console, click Support > Deployment Scripts.

      Deployment Script

    2. Select the appropriate platform (e.g. Microsoft Windows 64-bit).
    3. Tick the Activate Agent automatically after installation checkbox.
    4. Select the Security Policy you need for Citrix machines (e.g. Base Policy > Windows).
    5. Choose the target Computer Group.
    6. Select the Relay Group.

    The PowerShell script will be generated as seen below:

    Generated PowerShell script

  4. Copy all contents of generated PowerShell script and save it as .ps1 file in the startup scripts folder. Afterwards, set it as a startup script.

    Startup Script

The script downloads the DSA MSI package, then installs and activates it. This will always generate a different ID while keeping the deployment automatic. While re-activating the hosts based on their hostname, this procedure ensures that a new entry will be created for each new computer you deploy from your VDI.