Non-persistent VDI parameters, scripts, and settings

  • Release version: Zurich
  • Updated May 12, 2026
  • 2 minutes to read
  • Summarize
    Summarized using AI
    This content was generated using new OpenAI-powered functionality. Results are provided on an as is basis and are not guaranteed to be accurate or complete.

    Summary of Non-persistent VDI parameters, scripts, and settings

    This guide provides essential commands, script details, and configuration settings to set up the Agent Client Collector (ACC) for monitoring non-persistent Virtual Desktop Infrastructure (VDI) environments using a golden image. It focuses on the mid-less installation method, necessary logon/logoff scripts, and critical configuration in theacc.ymlfile to ensure smooth operation and accurate asset tracking for ServiceNow customers.

    Show full answer Show less

    Agent Client Collector Mid-less Installation

    To install the ACC on a reference device used for non-persistent VDIs, run the MSI installer silently with parameters that enable mid-less mode. Key parameters include:

    • /i <path-to-msi>: Path to the downloaded ACC MSI installer.
    • CONNECTWITHOUTMID="true": Configures direct connection to the CNC gateway without a MID Server.
    • ACCCNC="<your-acc-gateway>:443": Hostname and port of your CNC gateway from the ServiceNow instance.
    • REGISTRATIONKEY="<your-registration-key>": Registration key issued by your instance.
    • INSTANCEURL="<your-instance-url>": Full URL of your ServiceNow instance.
    • LOCALUSERNAME="SYSTEM": Runs the agent service as the SYSTEM account, required for non-persistent VDI monitoring.

    This installation command ensures the ACC operates correctly without a MID Server in ephemeral desktop environments.

    Logon and Logoff Scripts

    ServiceNow provides specific PowerShell scripts and CMD wrappers that must be configured in your VDI management tool to handle session start and end events:

    • logonscript.ps1: Restores the agent certificate from persistent storage to the VDI session, enabling seamless authentication without downloading a new certificate.
    • logonscript.cmd: Calls the PowerShell logon script; must be set as the post-synchronization or session-start script.
    • logoffscript.ps1: Pushes any remaining metrics collected by the ACC to ServiceNow before session disconnect.
    • logoffscript.cmd: Calls the PowerShell logoff script; configured as the power-off or session-end script.

    Scripts are recommended to reside in C:\DEXScripts\. If placed elsewhere, update the CMD wrappers accordingly.

    Non-persistent VDI Settings in acc.yml

    The acc.yml configuration file located at C:\ProgramData\ServiceNow\agent-client-collector\ must be set with these parameters for non-persistent VDIs:

    • persistencetype: nonpersistent — Identifies the agent as running on a non-persistent VDI.
    • disable-asset: true — Ensures each VDI instance creates a unique asset record instead of reusing one across duplicates.
    • agent-key-id: removed — The key ID must be removed before sealing the golden image so that each VDI requests a new key upon first registration.

    These settings guarantee accurate asset tracking and proper agent behavior in non-persistent VDI environments.

    Use this reference to find the Agent Client Collector mid-less installation command syntax, logon and logoff script file names and locations, and an installation command example when setting up a non-persistent VDI golden image.

    Agent Client Collector mid-less installation command

    Run the following command on the reference device to install Agent Client Collector in mid-less mode for non-persistent VDI use. Replace each placeholder with the value provided in your ServiceNow instance under Agent Client Collector > Agent Download.

    msiexec /i <path-to-msi> /quiet /qn /norestart CONNECT_WITHOUT_MID="true" ACC_CNC="<your-acc-gateway>:443" REGISTRATION_KEY="<your-registration-key>" INSTANCE_URL="<your-instance-url>" LOCALUSERNAME="SYSTEM"

    The following table describes each parameter.

    Parameter Description
    /i <path-to-msi> Path to the Agent Client Collector MSI installer that you downloaded from the ServiceNow instance.
    /quiet /qn /norestart Installs the agent silently and prevents an automatic restart of the reference device after installation.
    CONNECT_WITHOUT_MID="true" Configures the agent to connect directly to the Agent Client Collector Cloud Native Connector (CNC) gateway without requiring a MID Server.
    ACC_CNC="<your-acc-gateway>:443" Hostname and port of your CNC gateway. Copy this value from the mid-less installation command in Agent Client Collector > Agent Download on your ServiceNow instance.
    REGISTRATION_KEY="<your-registration-key>" Registration key issued by your ServiceNow instance for this agent.
    INSTANCE_URL="<your-instance-url>" Fully qualified URL of your ServiceNow instance, for example, https://<instance>.service-now.com.
    LOCALUSERNAME="SYSTEM" Configures the agent service to run as the local SYSTEM account. This setting is required for non-persistent VDI monitoring.

    Logon and logoff scripts

    The following table lists the file names, recommended locations, and purpose of the scripts that are required for non-persistent VDI sessions. Obtain these scripts from ServiceNow Customer Support before you configure the VDI pool.

    If you place the PowerShell scripts in a location other than C:\DEXScripts\, update the corresponding .cmd wrapper to reference the new path.

    File name Type Recommended location Purpose
    logon_script.ps1 PowerShell C:\DEXScripts\ Restores the agent certificate from your persistent storage to the VDI when a session starts. Enables authentication without downloading a new certificate.
    logon_script.cmd CMD wrapper Configured in your VDI management tool as the post-synchronization or session-start script Calls logon_script.ps1. Update the path inside this file if you place the PowerShell script in a different location.
    logoff_script.ps1 PowerShell C:\DEXScripts\ Pushes residual metrics from the Agent Client Collector to the ServiceNow instance before the session disconnects.
    logoff_script.cmd CMD wrapper Configured in your VDI management tool as the power-off or session-end script Calls logoff_script.ps1. Update the path inside this file if you place the PowerShell script in a different location.

    Non-persistent VDI settings in acc.yml

    The following table lists the acc.yml settings that apply to a non-persistent VDI golden image. acc.yml is located at C:\ProgramData\ServiceNow\agent-client-collector\.

    Setting Required value Purpose
    persistence_type non_persistent Defines that the agent runs on a non-persistent VDI.
    disable-asset true Prevents the agent from re-using a single asset record across duplicate VDIs. Each duplicate VDI generates its own asset record on first start.
    agent-key-id Removed Removed from the file before sealing the golden image so duplicate VDIs request a fresh key on first registration.