Workspace Environment Management

Troubleshoot scripted task execution problems in Monitor

DaaS Monitor enables you to run scripted tasks from Filters > Machines > Machine actions > Run scripted task. However, you might encounter errors when attempting to run a scripted task, such as:

  • WEM Agent is not found
  • WEM Agent is not recently connected
  • WEM Agent version is not supported

This article describes the common causes of these errors and how to resolve them.

WEM Agent not installed

Cause: The Run scripted task feature requires the WEM Agent to be installed. In Citrix Virtual Apps and Desktops 2507 LTSR and later, the WEM Agent is installed automatically on VDAs. In earlier versions, the agent must be installed manually.

Resolution: Verify that the WEM Agent is installed on the target machine. The default installation path is:

C:\Program Files (x86)\Citrix\Workspace Environment Management Agent

WEM Agent running in Basic Deployment mode

Cause: When the WEM Agent runs in the Basic deployment mode, it operates offline and does not connect to the network.

Scripted tasks require the agent to run in the Cloud service deployment mode and connect to the WEM service using AD-joined (or called Cloud Connector method) or Non-domain-joined method.

Resolution:

  1. Use the WEM Health Check Tool to verify the agent mode. The tool is located at: C:\Program Files (x86)\Citrix\Workspace Environment Management Agent\Health Check Tool
  2. To switch the agent to AD-joined method in the Cloud service deployment mode, complete one of the following actions:

    • Use the Health Check Tool to specify the Cloud Connector IP address or FQDN.
    • Use Group Policy to distribute Cloud Connector settings across multiple VDAs. For more information, see Configure group policies.

WEM Agent not registered to WEM service

Cause: The WEM Agent must be registered to a configuration set in the WEM service. Scripted tasks cannot run if the registration is incomplete.

Resolution:

Check the agent’s registration status:

  1. In the WEM web console, go to Monitoring > Agents > Registrations.
  2. Verify whether the agent appears as Registered or Unregistered.
  3. If the agent is unregistered or registration issues persist, review the following configuration set scenarios to further troubleshoot the issue:

Agent not bound to any configuration set

Cause: No configuration set is assigned to the agent.

Resolution: Assign a configuration set using one of the following methods:

  • Configuring WEM options when creating or editing a machine catalog in Web Studio
  • Creating Directory Objects (OU, group, or individual machine) in the WEM web console.

Agent bound to multiple configuration sets

Cause: Conflicting assignments exist. For example:

  • A machine catalog is bound to Configuration Set A, and
  • The Domain Computers group is bound to Configuration Set B.

Resolution: In the WEM web console, go to Directory Objects, review the bindings, and remove conflicting configuration set assignments.

WEM Agents not connected to the WEM service

Cause: The agent cannot connect to the WEM service due to network issues or firewall restrictions.

Resolution: Verify the network environment and ensure that all required connections to the WEM service are allowed.

WEM Agent version limitation for scripted tasks

Cause: WEM Agent versions earlier than 2207.1.0.1 do not support running scripted tasks.

Resolutio:n Upgrade the WEM Agent to a supported version.

WEM service upgrade in progress

Cause: The WEM service is temporarily unavailable during a WEM infrastructure service upgrade.

Resolution: Wait until the upgrade completes, and then retry the operation.

WEM database archived

Cause: The WEM database can be archived if no operations occur and no active agents connect for 30 consecutive days.

Resolution: Unarchive the database by manually opening the WEM web console. This action automatically triggers the unarchive process.

Troubleshoot scripted task execution problems in Monitor