Dec 232019
 

This is an older upgrade, but you can still use it as a reference point.

There are a lot of guides out there, and this isn’t to repeat any of them, but how I did it.

Great blogs

https://www.carlstalhood.com/workspace-environment-management/

https://www.mycugc.org/blogs/cugc-blogs/2018/07/20/how-to-update-citrix-workspace-environment-managem

WEM Upgrade Process

*NOTE*I use BISF for all my images, In this post, you will see I don’t run these. BISF will do it for me when I seal up my image

C:\Windows\Microsoft.NET\Framework64\v4.0.30319\ngen.exe update
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\ngen.exe eqi 3

WEM Upgrade layout

Infrastructure Services

  1. Run the installer of the Infrastructure Services version you want to upgrade to. 
    1. This may not be needed, but I do it as a safety net.
  2. You should manually stop the Norskale Infrastructure Services service before upgrading to ensure the upgrade is successful.
Machine generated alternative text:
ices (L 
Norskale Infrastructure Service 
Stop the service 
Restart the service 
Description: 
Norskale Infrastructure Broker Service 
Net.Tcp Port Sharing Service 
Netlogon 
Network Connection Broker 
Network Connections 
Network Connectivity Assistant 
Network List Service 
Network Location Awareness 
Network Setup Service 
Norskale Infrastructure Service 
Ice can cmmcn lent o ution 
OfficeScan NT Listener 
OfficeScan NT RealTime Scan 
Offline Files 
Optimize drives 
Performance Counter DLL Host 
Performance Logs & Alerts 
Phone Service 
Plug and Play 
Portable Device Enumerator Service 
Power 
Print Spooler 
Printer Extensions and Notifications 
Framework 
Stop 
Resume 
All Tasks 
Refresh 
P rope rties 
Help 
Problem Reports and Solutions Control Panel Support 
Description 
Provides ability to share TCP ports cn.'er 
Maintains a secure channel between thin. 
Brokers connections that allow Window... 
Manages objects in the Network and Din. 
Provides DirectAccess status notification. 
Identifies the networks to which the co... 
Collects and stores configuration infor... 
The Network Setup Service manages th... 
This service delivers network notification. 
Infrastructure Broker Service 
advanced solutions and featur... 
commands and notifications fr... 
Real-time, Scheduled, and Ma... 
ne Files service performs maint... 
e computer run more efficientl... 
emote users and 64-bit process... 
nce Logs and Alerts Collects 
the telephony state on the dev... 
computer to recognize and ad... 
group policy for removable 
power policy and power polic... 
ice spools print jobs and handl... 
This service opens custom printer dialo... 
This service provides support for viewin...
Machine generated alternative text:
Name 
Agent Group Policies 
Configuration Templates 
Citrix Workspace Environment Management Agent Setup.exe 
Citrix Works ce Environment Mana ement Infrastructure Services Setu .exe 
Ope n 
Run as administrator 
Pin to Start 
Restore previous versions 
Send to 
Copy 
Create shortcut 
Delete 
Rename 
Pro perties 
Date modified 
1/2/2019 2:48 PM 
1/2/2019 2:50 PM 
1/2/2019 2:48 PM 
1/2/2019 2:48 PM 
1/2/2019248 PM 
Type 
File folder 
File folder 
Application 
Application 
Application 
Size 
71,557 KB 
66,610 KB
Machine generated alternative text:
Citrix Workspace Environment Management Infrastructure Services - InstallShieId X 
Welcome to the InstallShield Wizard for Citrix 
Workspace Environment Management 
Workspace 
Infrastructure Services 
The InstallShieId(R) Wizard will install Citrix Workspace 
Environment Management Infrastructure Services on your 
computer. To contnue, dick Next. 
WARNING: This program is protected by copyright Ian and 
internatonal treates. 
Next >
<img src="https://lh5.googleusercontent.com/KuesNN5mrm5CYACOhR1zT0AAzgwo3gS_uxyavyEWM3h6YHjk9jmt8WO0JGI62hkt7wd-0JbqRrZx7Kdpfvp-6h7sdgAElhYIw_SjYI3ml7E4dbEox6QFe6iN-CWdTDdcaLX-ZUg" alt="Machine generated alternative text: Citrix Workspace Environment Management Infrastructure Services License Agreement Please read the following license agreement careMIy. CITRIX LICENSE AGREEMENT – InstallShieId This is a legal agreement ("AGREENENT") between the end-user customer ("you"): the providing Citrix entity (the applicable providing entity is hereinafter refe«ed to as "CITRIX"). Your location of receipt of the Citrix pro duct (hereinafter "PRODUCT") an maintenance (hereinafter "NIANTENANCE") detennines the providing entity as identified at
Machine generated alternative text:
Citrix Workspace Environment Management Infrastructure Services - Instal[ShieId 
Customer Information 
Please enter your information. 
user Name: 
Qrganiza bon: 
"star CLI 
InstallShieId 
Next >
Machine generated alternative text:
Citrix Workspace Environment Management Infrastructure Services 
Setup Type 
Choose the setup type that best suits your needs. 
Please select a setup type. 
@Complete 
- InstallShieId 
All program features will be installed. (Requires the most disk 
space.) 
O custo 
Choose which program features pu want installed and where they 
will be installed. Recommended for advanced users. 
InstallShieId 
Next >
Machine generated alternative text:
Citrix Workspace Environment Management Infrastructure Services 
Ready to Install the Program 
The wizard is ready to begin installation. 
Click Install to begin the installation. 
- InstallShieId 
If pu want to review or change any of your installation settings, dick Back. Click Cancel to 
exit the wizard. 
InstallShieId 
Install
Machine generated alternative text:
Citrix Workspace Environment Management Infrastructure Services - InstallShieId 
InstallShield Wizard Completed 
No rkspæe 
The InstallShieId Wizard has installed Citrix 
Workspace Environment Management Infrastructure Services. 
Click Finish to exit the wizard. 
[Z Start the Database Management utility.
  1. Now start the Database Management Utility which will lead in 5b.

Upgrade Database

Machine generated alternative text:
WEM Database Management Utüt-y 
Database Management 
Create 
täB*e r Stibn : 
Upgrade 
ÜætöbSSe pdzte 
ciTR!X• 
Workspace Environment Management
Machine generated alternative text:
Citrix Workspace Environment Management Console - Install... 
Installing Citrix Workspace Environment Management Console 
The program features you selected are being installed. 
Please wait while the InstallShieId Wizard installs Citrix Workspace 
Environment Management Console. This may take several minutes. 
Status: 
Removing backup files 
InstallShieId
  1. Now launch the Infrastructure Services Configuration Utility again:
  1. C:\Program Files (x86)\Norskale\Norskale Infrastructure Services\Norskale Broker Service Configuration Utility.exe”
  1. Repopulate with all values that you took the note off in the initial tests and allow the services to restart
C:\2B6A64A5\7B474F2F-D05A-4FF0-B277-E68F9B34537D_files\image013.png

Service account used here.

Machine generated alternative text:
Configuraton Management 
Load Configuration 
Database Settngs 
Save Con figuration 
Net'A•ork Settngs 
Advanced Settngs 
Da tabase Main tenance 
Licensing 
@ Enable scheduled database maintenance 
Stabsbcs retention period (days): 
System monitoring re ten ton period (days): 
Agent registrations retention period (days): 
Execution time (HH:MM): 
02:00
Machine generated alternative text:
WEM Infrastructure Service Configurabon 
Configuraton Management 
Load Configuration 
Database Settings 
Save Con figuration 
Advanced Settings 
Database Maintenance 
Licensing 
Administr a bon por t: 
Agent service port: 
Cache synchr onizaton port: 
WEM monitoring port: 
8287
Machine generated alternative text:
Configuration Management 
L oad Con figura bon 
ave Configuraton 
Net'A'ork Settings 
Infrastructure Service Configuration 
Broker Service will be restarted to apply settngs, Do you vvant to proceed? 
Adva
Machine generated alternative text:
Home 
Configure license server 
L;cense Mar,aoemerit 
Actions 
Applications 
NeF•vork Drives 
Virtual Drives 
Registry Enmes 
Envir onrnen t Variables 
e ports 
Filters 
Assignments 
System Optimization 
Policies and-profiles 
Securiy 
Get Help Options 
Support Local Settng: 
About 
We&spsce 
About Ctrtx Workspace Environment Management Console 
Citrix Workspace Environment Management Console 
Version 1808.0.1.1 
@ 2018 Citrix Systems, Inc. All rights reserved. 
Version 1808.0.1.1 
@ 2018 Citrix Systems, Inc. All rights reserved.

Upgrade Admin Console

Machine generated alternative text:
Application Tools 
View 
Manage 
Home 
* Quick access 
Desktop 
Downloads 
Documents 
[e Pictures 
System32 
This pc 
Netwo rk 
Share 
Workspace- Environment- Management-ve 1808-00-01-01 
Citrix WEM 1808-Latest 
Network jaxnavy.org data 
Name 
Agent Group Policies 
Configuration Templates 
IT 
IT Software Installs 
vsl ctxwen, 
Workspace- Environment- Management-ve 1808-00-01-01 
Date modified 
1/2/2019 2:48 PM 
1/2/2019 2:30 PM 
1/2/2019 2:48 PM 
1/2/2019 248 PM 
1/2/2019 2:48 PM 
Workspace-Erwironment-Management-'F 1808-00-01-01 
Citrix Workspace Environment Management Agent Setup.exe 
Citrix Workspace Environment Management Console Setup.exe 
Citrix Workspace Environment Management Infrastructure Services Setup.exe 
Type 
File folder 
File folder 
Application 
Application 
Application 
Size 
71,557 KB 
60610 KB 
55,992 KB
Machine generated alternative text:
Citrix Workspace Environment Management Console - InstallShieId Wizard 
Preparing to InstaH.„ 
Citrix Workspace Environment Management Console Setup is 
preparing the InstallShieId Wizard, which will guide you 
through the program setup gruess. Please wait. 
Extractng : Citrix Workspace Environment Management 
Console msi

Upgrade Agent host

I just do the basic install, I use to tell it to install the Cache on the D drive. But that’s really not needed anymore. I use BISF, and tell it to move it for me. I like to have a D drive on my machines (PVS).

You can read here in the comments

https://www.mycugc.org/blogs/cugc-blogs/2017/11/30/wem-advanced-guidance-part-1

<img src="https://lh3.googleusercontent.com/y_7dA9IAdcwNO_befM2TzorfgrO2_S4EePHhRS2odleNFuS9k2vHwPZ2HZ_4k3viOxmVF9iX3nnOskjxhCPsRj__eO0n1Py0yYI1z9_xhYKESAL6XbsQuB2JpCFZNWjG8Ygtklo" alt="Machine generated alternative text: Home Share View Application Toolr Workspace-Em.'lronment-Managernent-'F 1808-00-01-01 Manage
Machine generated alternative text:
Citrix Workspace Environment Management Agent - InstallShieId Wizard 
Welcome to the InstallShield Wizard for Citrix 
Workspace Environment Management Agent 
Wo rkspace 
The InstallShieId(R) Wzard will allon pu to modify, repair, or 
remove Citrix Workspace Environment Management Agent. To 
continue, dick Next. 
Next >

Then just follow the basic prompts

Update new ADMX and ADML Files

For me, it’s this

\\Domain.org\SYSVOL\Domain.org\Policies\PolicyDefinitions

Changes In 1903 and up

Keep this in mind

Now If your upgrading beyond 1903 Remember the paths have changed

Reference

James Kindon, has done the work for you, Use his scripts.

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
  1. 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 nameNorskale Agent Host ServiceCitrix WEM Agent Host Service (WemAgentSvc)
Process nameNorskale Agent Host Service.exeCitrix.Wem.Agent.Service.exe
Event LogsNorskale Agent ServiceWEM Agent Service




1912 has introduced some new changes as well.

https://docs.citrix.com/en-us/workspace-environment-management/current-release/whats-new.html

*One thing to note on Port*

Cache synchronization port. (Applicable to Workspace Environment Management 1909 and earlier; replaced by Cached data synchronization port in Workspace Environment Management 1912 and later.) The port on which the agent cache synchronization process connects to the infrastructure service to synchronize the agent cache with the infrastructure server. The cache synchronization port must be the same as the port you configured for the cache synchronization port (WEM Infrastructure Service Configuration > Network Settings) during the infrastructure services configuration. The port defaults to 8285 and corresponds to the AgentCacheSyncPort command-line argument.

Cached data synchronization port. (Applicable to Workspace Environment Management 1912 and later; replaces Cache synchronization port of Workspace Environment Management 1909 and earlier.) The port on which the agent cache synchronization process connects to the infrastructure service to synchronize the agent cache with the infrastructure server. The cached data synchronization port must be the same as the port you configured for the cached data synchronization port (WEM Infrastructure Service Configuration > Network Settings) during the infrastructure services configuration. The port defaults to 8288 and corresponds to the CachedDataSyncPort command-line argument. Alternatively, you can specify the port using a command-line option in the silent installation of the WEM agent

Wayne Lui states its backward compatible and still listens, But I would add this into your Firewall Ruleset.

Port information

https://docs.citrix.com/en-us/workspace-environment-management/current-release/reference/ports.html

Dec 052016
 

Background

Using Citrix Profile Management with profile streaming enabled should keep your logon times pretty low.  Recently, they updated the version of our Antivirus (Trend Micro) to the latest, and suddenly I started seeing desktops fail with “session prepare failure” errors.  After much investigation it had something to do with the behavior monitoring feature of the AV software hanging Citrix Profile Management long enough to cause the desktop to freeze/unregister.  Turning off the profile streaming option fixed that issue.

Since then I have noticed logon times have skyrocketed.  I used to see an average logon time of about 30 seconds, and after disabling profile streaming I see average times well over 1 minute (some individuals as high as 5 minutes).

In order to try to get our logon times back down to a reasonable time I wrote a script to investigate the profile store.  I found a few folders which contain a ton of files – files that have to be copied in at each logon slowing things down.

The Fix

I wrote a blog post a while back about using a Powershell Script to redirect folders via symbolic links.  You can find that here http://www.citrixirc.com/?p=315.   We can use that same method to redirect “bad” folders, but using Citrix Workspace Environment Management instead (no need to learn how to script!).  NOTE: Users must have the “Create symbolic links” right!

Instructions

Of course, you are going to need WEM setup in your environment.  Carl Stalhood has a great step by step on how to set it up here http://www.carlstalhood.com/workspace-environment-manager/.

A couple of caveats I would add to his blog post:
If you are installing on a PVS image before shutting down your maintenance/private mode vdisk to re-seal, kill the Norskale Agent Host Service.  For whatever reason if you don’t do this it can cause your vms in standard mode to take an obscenely long time to shutdown.
If you have a PVS environment and you have redirected the WEM cache to the persistent drive use a startup task to refresh the cache, force restart the Norskale Agent Host Service, and start netlogon after.  If the cache doesn’t already exist WEM doesn’t seem to check with the WEM server.  You have to create the cache, and then restart the service so that it reads it, and force restarting the Norskale Agent Host Service will stop netlogon (dependent on it).  Chicken or the egg thing…

Assuming you have WEM setup and running:

Create a Folders and Files action that creates the redirected folder structure in the user home directory or where ever you want to put it.  In the \\server\share\VDIPaths (or whatever you name it) have the folder structure laid out for all the folders you wish to redirect (empty folders) – this is your folder “template” directory:
ie: \\server\share\VDIPaths\Recent
\\server\share\VDIPaths\IELocal\DOMStore
\\server\share\VDIPaths\GoogleChrome\Googlelocal
etc.

The source path is the folder you just created and the target is where you want to put it.  Make sure overwrite target if existing and run once are unchecked
120516_1959_UsingCitrix1.png

Under Options – Copy Directory Content (creates the folder structure in the user’s %homeshare% folder or where ever you put it), and make sure the Execution order is “0” – happens first.
120516_1959_UsingCitrix2.png

Next we need to perform 3 tasks for each folder you want to redirect to the user %homeshare%\VDIPaths folder (or where ever you decide to put it)

We will first move the existing data in the profile to the redirect location, second delete the existing data in the profile, and finally create the symbolic link.

Move

The first thing we do is create the move operation.  Name it whatever you want.  The source is the local profile path to the user, and the target is where we want to move the files
120516_1959_UsingCitrix3.png

Under the Options Tab select Move Directory Content and set the execution order to 1.  We want the “VDIPaths\Recent” folder to have been created already by the create task
120516_1959_UsingCitrix4.png

Delete

Set the source path to the directory you want to delete
120516_1959_UsingCitrix5.png

Under the Options Tab select Delete Files / Folders and set the Execution order to 2 as we want the files to be moved to the new location prior to deleting.
120516_1959_UsingCitrix6.png

Create the Symbolic Link

The Source will be the %homeshare% location, and the target will be the local profile path location.
120516_1959_UsingCitrix7.png

Under the Options tab set the action to Create Directory Symbolic Link and set the execution order to 3.
120516_1959_UsingCitrix8.png

Assign tasks

Assuming you have already setup configured users you can now assign the 4 tasks above to your test user or group.  Going forward you will only need to create the latter 3 tasks, and just make sure you update the “template” directory accordingly.

Assign the first task (create VDI_Paths in my case) setting always true
Assign the second task (Move Recent in my case) setting always true
Assign the third task (Delete Recent in my case) setting always true
Assign the 4th task (Recent_Symbolic_Link in my case) setting always true
120516_1959_UsingCitrix9.png

0 – Create VDI_Paths – copies the folder structure to the user’s %homeshare% directory
1 – Move Recent – moves the contents of %appdata%\Microsoft\Windows\Recent to %homeshare%\VDIPaths\Recent
2 – Delete Recent – deletes the %appdata%\Microsoft\Windows\Recent folder
3 – Recent_Symbolic_Link – Creates a symbolic link at %appdata%\Microsoft\Windows\Recent pointing to %homeshare%\VDIPaths\Recent

You end up with something that looks like this:
120516_1959_UsingCitrix10.png

If you click into the Recent symbolic link you will see it still looks like it is on the local C: drive as far as the path goes, but it is “redirected” to the path you specified.  If it does not work check the Norskale Vuem Agent.log file in the user profile, and look for the error.  If it is a permissions issue, then you probably have to allow the user to create symbolic links via gpo and/or local policy (I put it both places just to be sure it takes).
120516_1959_UsingCitrix11.png

I have done this for the following paths thus far with success

%appdata%\Microsoft\Windows\Recent – all the recent places/docs a user has opened
%appdata%\Microsoft\Signatures – Outlook signatures
%localappdata%\Apps\2.0 – This one is for clickonce apps – I also had to make another task to create the “Apps” folder in the local profile in case it doesn’t exist (only one that is different from the rest)
%localappdata%\Microsoft\Internet Explorer\DOMStore – some IE cache that gets quite large
%appdata%\Microsoft\Office\Recent – all recent Office docs
%localappdata%\Google – Chrome cache
%appdata%\Mozilla – Firefox cache
%localappdata%\Mozilla – Firefox cache
%localappdata%\Apps\Evernote – Evernote (unfortunately some of my users need this)
%localappdata%\WebEx – WebEx Cache

Once you are certain all of the existing data for each of your users has been moved to their %homeshare% directory (or where ever you put it) you can exclude those folders from UPM, and remove the Move/Delete tasks.  It won’t hurt to leave them though…