I have been recommending in all deployments ever since I started with WEM, to implement the very simple “WEM Agent Refresh” Start-Up Script. Every deployment I have seen, touched or been involved that uses this basic concept of “refresh my cache at start-up” has no issues relating to cache, delayed start-up or inconsistent behaviours. It just works.
With the release of Citrix WEM 1903 (Cloud) and 1909 (on-prem), there are some major changes to the path structures for WEM as the team begins the rebranding process away for Norskale. This of course results in some changes to how the start-up scripts are going to run and process.
The following changes are going to occur so be ready:
- A new clean installation of the WEM Agent will result in a complete change of Service Names and Folder Structures as below
- The new Service name is: Citrix WEM Agent Host Service
- The new process name is: Wem.Agent.Service.exe
- The new path structure is: %ProgramFiles%\Citrix\Workspace Environment Management Agent
- An 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
Be aware also that in both clean and upgraded deployments, the Windows Event logs will change from Norskale Agent Service to WEM Agent Service
Old (Pre Cloud Service 1903 and On-Prem 1909) | New (Post Cloud Service 1903 and On-Prem 1909) | |
Installation path | %ProgramFiles%\Norskale\Norskale Agent Host | %ProgramFiles%\Citrix\Workspace Environment Management Agent |
Service name | Norskale Agent Host Service | Citrix WEM Agent Host Service (WemAgentSvc) |
Process name | Norskale Agent Host Service.exe | Citrix.Wem.Agent.Service.exe |
Event Logs | Norskale Agent Service | WEM Agent Service |
As such, I have written a couple of replacement scripts with a few more brains and checks than the original batch fun that is publicly available. The scripts (both PowerShell and batch) do the following
- Check to see what version of WEM is installed based on the Service Name (I did not say I was smart).
- If the original Norskale Service is returned, then the script will simply restart the Norskale Agent Service (and the Netlogon accordingly), and then refresh the cache the same as the original script does
- If the new Service is returned, then the Script will check to see if this is an upgrade or a clean install. If it is a clean install, it will stop the appropriate services, refresh the cache via the new pathing and pat itself on the back. If it is an upgraded install, it will leverage the old path to refresh the cache instead
I have seen multiple discussions posts and environments that have needed to all periods of sleep and timeouts in between certain components in their environments, these scripts should be easy enough to alter and add to accordingly
All scripts are available in my Github Repository
Good jobman
LikeLike
Good stuff man
LikeLike
Cheers Ray
LikeLike
Interesting, thx ! This will also impact antivirus exclusions…
LikeLike
Great point
LikeLike
Recently discovered a new article: https://docs.citrix.com/en-us/tech-zone/build/tech-papers/antivirus-best-practices.html but looks like missing some things…
LikeLike
Hi James,
I hope you are well !
I cannot find the 1909 release on Citrix web sites, does this version has been already realsed or not ?
Thanks for your answer.
Regards
Julien
LikeLike
coming soon buddy – not yet out 🙂
LikeLike
1909 was released yesterday (9/19/2019) – https://wagthereal.com/2019/09/19/wem-1909-update-available/
LikeLike
Did 1906 Fix the 5 sec extra delay that was in 1903? “Citrix WEM User Logon Service adds 5 seconds to logon time at Citrix Discussions …”
LikeLike
Hi James — great post! Thanks for sharing. Question for you — I’m using WEM service and I noticed that agent cache refreshes seem to vary between my VMs. I’ve implemented your script as a machine startup script and I’m using both ‘Offline mode’ and ‘Use Cache to Accelerate Actions Processing’ within my configuration but when I make a change in the WEM console, VMs get the update at various times…some will get it without any intervention, others will get it upon a reboot of the VM and some of them may not get the settings at all unless I manually force a refresh from the UI menu. Any thoughts?
Thanks again for all you do for the community!
LikeLike
you are most probably experiencing the fun of the hidden radomized refresh interval…the machines will always update at different times – it’s one of those annoyances that if you want full control, you may want to put in a scheduled task to drive the bus. With the cloud service i have had a few customers needing to physically delete the cache at machine startup (yuk) else things never line up properly
LikeLike