This week I wanted to test the the Workspace Environment Management Suite which is included in the XenApp/XenDesktop Enterprise edition. I don’t want to write an article about how to install the software. For a detailed installation guide you can refer to Carl Stalhoods website.
Update – 20191211
With the latest Citrix WEM Release the folder name under Program Files changed from “C:\Program Files (x86)\Norskale\Norskale Agent Host” to “C:\Program Files (x86)\Citrix\Workspace Environment Management Agent”. Updated the post with the correct folder locations.
Install parameters when using PVS (silent):
1 |
Setup.exe /S /v"/qn /norestart AgentCacheAlternateLocation=\"D:\WEMCache\" AgentServiceUseNonPersistentCompliantHistory=\"1\"" |
Its important to redirect the cache to a persistent drive otherwise information about the process history will be lost after a reboot.
After installing the WEM Agent into the vDisk and configuring the needed GPO settings I powered on my XenApp worker for testing purpose. A short view in the WEM Admin console was telling me, that there was an issue with the “Synchronization State” under “Administration –> Agents”.
In the eventlog you only could find the information that the agent couldnt connect the broker machine because of a connection timeout.
First of all I was thinking maybe its a firwall problem but the specific ports used by the WEM Agent have been accessible. The following ports are used:
- Agent Broker – 8286
- Agent Sync – 8285
After reading the product documentation I found a command how to force the agent to synchronize against the WEM server.
1 2 3 4 5 6 |
C:\Users\Administrator>"C:\Program Files (x86)\Citrix\Workspace Environment Management Agent\AgentCacheUtility.exe" -refreshcache Citrix Workspace Environment Management Agent Cache Management Utility - By Citrix Systems, Inc - Version 4.2.0.0 Start Time: 03.05.2017 11:36:44 Total changes downloaded: 0/0 Last successful synchronization: 03.05.2017 11:36:45 Operation Completed Successfully |
Sounds promising 🙂 Lets check the agent status in the WEM Admin console.
Now the synchronization was working but after rebooting the provisioned system the problem with the unknown sync state occured again.
Fix: You need to create a scheduled task which is refreshing the WEM cache on every startup of the system. The task should be run by the user “NT AUTHORITY\SYSTEM”.
1 2 3 4 |
net stop "Norskale Agent Host Service" /y net start "Norskale Agent Host Service" net start "Netlogon" "C:\Program Files (x86)\Citrix\Workspace Environment Management Agent\AgentCacheUtility.exe" -refreshcache |
Thx for this great Info, I would inplement this in our free Tool Base Image Script Framework (BIS-F)
Hi Julien
not realy sure what you mean with the task aobve.do i make a script where i shutdown the norskale service, make a cache refresh, and then start the norskale and netlogon service?
or is it ok, to just refresh cache at startup?
Hello Thorsten. Exaclty you need to create a batch file which will be triggered at the system startup.
1.) Force the Norskale service to stop
2.) Start the Norskale + Netlogon service
3.) Refresh the cache.
I couldnt get the agent synchronized without all the mentioned steps.
thx 4 the fast replay
i will try it first without and then double check with the script.
what about the gpo setting „vuemappcmd extra sync delay“ extra launch delay = 1000
thats what we setup.
we have a running test with 2008r2 on xenserver with pvs, now i just setup a pilot with 2016 on hpe moonshot m710x cartridges.
have a nice evening
Thorsten
I already saw the mentioned gpo setting while upgrading to WEM 4.3 or 4.4. Unfortunately I didn’t had time to test the launch delay yet. Nice setup! Please keep me updated ☺️
Thanks for this blog Julien really helped me alot understanding its behaviour. Im keen to find out if the Sync Delay actually works. Thorsten you set this to „1000“ and the GPO mentions only a delay of between 100 – 200ms. Is this a typo? How did you get on? I tested a delay of 150ms but i still had to go on and force a refresh as Julien mentions doing so i might have to implement the scheduled task regardless.
Julian,
I thought a “upgraded installation of the WEM agent will result in partial changes to your environment:
The new Service name is: Citrix WEM Agent Host Service
The new process name is: Wem.Agent.Service.exe
The path on the file system will not be altered and will remain as it was: %ProgramFiles%\Norskale\Norskale Agent Host”
You have
net stop “Norskale Agent Host Service” /y
net start “Norskale Agent Host Service”
net start “Netlogon”
“C:\Program Files (x86)\Citrix\Workspace Environment Management Agent\AgentCacheUtility.exe” -refreshcache
Should it reflect the new service if it’s upgraded?
I assume this is still a issue for 4.4 and newer?
I didn’t get the news that it’s fixxed.
Thank you!
My mistake was not to use the system account, the scheduled task wouldn’t run with an admin account.
Everything is OK now 🙂
Thanks for sharing this Julian!
anyone know if this is now fixed in the latest? Workspace-Environment-Management-v-1903-00-01-01
Working with WEM 1903 in a current project and I still need to refresh the cache for the PVS targets on each reboot. If you are using BISF the cache refresh action will already be included in the startup task and you don’t need to worry about anything 🙂
Anyone know if this is resolved in the lastest version?
Workspace-Environment-Management-v-1903-00-01-01
Name changes as your aware
For those who are not aware.
https://jkindon-com.cdn.ampproject.org/v/s/jkindon.com/2019/09/11/citrix-wem-updated-start-up-scripts/amp/?amp_js_v=a2&_gsa=1&usqp=mq331AQCKAE%3D#aoh=15751403836875&referrer=https%3A%2F%2Fwww.google.com&_tf=From%20%251%24s&share=https%3A%2F%2Fjkindon.com%2F2019%2F09%2F11%2Fcitrix-wem-updated-start-up-scripts%2F
Updated the post.