Citrix WEM Updated Start-Up Scripts

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:

  1. 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
  2. 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

  1. Check to see what version of WEM is installed based on the Service Name (I did not say I was smart).
  2. 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
  3. 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

 

12 thoughts on “Citrix WEM Updated Start-Up Scripts

Add yours

  1. 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

    Like

  2. 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 …”

    Like

  3. 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!

    Like

    1. 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

      Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Create a website or blog at WordPress.com

Up ↑

%d bloggers like this: