Optimize WVD Master Image using Citrix Optimizer

In this blog we are going to discuss about using Citrix Optimizer to Optimize the WVD Master Image.

Citrix Optimizer is a well-known tool which can optimize your master image with a single click. Citrix Optimizer will automatically detect the target operating system and provide the optimization options relevant for the Operating system.

Citrix Optimizer can:

  • Disable Services
  • Disable Scheduled tasks
  • Remove Built-in Windows Apps
  • Perform registry tweaks for VDIs like Increasing the Disk I/O timeout, memory dump creation etc
  • Clear event logs
  • NGEN

Citrix Optimizer support the below Modes.

ModeDescription 
ExecuteExecute the Citrix Optimizer settings 
AnalyzeAnalyze whether the settings are currently applied 
Roll backTo Roll back the execute of Citrix Optimizer 

Download Citrix Optimizer

To download the Citrix Optimizer software Visit https://support.citrix.com/article/CTX224676

You minimum need a free Citrix account to download the software. Click on “log in to verify download permissions”

Machine generated alternative text:
CTX224676 
Citrix Optimizer 
Tools | 73 found this helpful I Created: 14 Nov 2020 | Modified: 08 Feb 2021 
Log in to verify download permissions 
CitrixOptimizer.zip

You will be redirected to the Citrix Login page , login using your citrix credentials

Machine generated alternative text:
Sign in with your Citrix account 
Username k 
Password* 
Log in

Click on Download to start the download of the software.

Machine generated alternative text:
CTX224676 
Citrix Optimizer 
Tools | 73 found this helpful I Created: 14 Nov 2020 | Modified: 08 F 
Download 
CitrixOptimizer.zip

Understanding the functionality

Double Click on the  “CitrixOptimizer.exe” to launch the Optimizer

Machine generated alternative text:
Downloads > CitrixOptimizer 
Name 
Modules 
Templates 
Citrix.SuppTools.Utility.dll 
e 
CitrixOptimizer 
CitrixOptimizer.exe.config 
CtxOptimizerEngine 
CtxOptimizerReport.xslt 
ThirdPartyNotices

Citrix Optimizer automatically detects your operating system and suggest the default template for you to execute.

Machine generated alternative text:
Citrix Optimizer 
Analyze and improve Virtual Apps and Desktops performance by applying optimizations 
Start with a template or file: 
Local Templates 
Template Marketplace 
History 
Recent Files 
Template Builder 
Category 
OS Optimizations 
Template 
Browse 
e Windows 10 build 2004 from Citrix (Recommended) 
e Windows 10 build 1607 from Citrix 
e Windows 10 build 1703 from Citrix 
e Windows 10 build 1709 from Citrix 
e Windows 10 build 1803 from Citrix 
e Windows 10 build 1809 from Citrix

It will help you to optimize services, remove built-in apps, disable scheduled tasks and perform some registry tweaks to improve your VDI performance.

Machine generated alternative text:
All 
147/156 
Disable Services 
40/40 
Remove Built-in Apps 
33/33 
Disable Scheduled Tasks 
53/53 
Miscellaneous 
14/14 
Maintenance Tasks 
3/3 
Optional Components 
0/9 
Rollback 
4/4

Are you exited to click on “Optimize” ?. Wait!….

Citrix Optimizer will remove required things for WVD machine, the simple example is “AppInstaller” which is needed for your MSIX packages. It will be default remove MS Paint, Sticky notes etc. It will disable Windows update by default.

Hmm!… What can we do?.

Let us create a custom template for WVD which will remove only what we need and  can be reused later for your organization.

Create a custom template for WVD

Click on “Template Builder and Click on the default template related to your OS. For eg:- I am using a 20H1 machine so I will select “Windows 10 build 2014 from Citrix” to start with.

Machine generated alternative text:
Start with a template or file: 
Local Templates 
Template Marketplace 
History 
Recent Files 
Template Builder 
Add New Category 
OS Optimizations 
Add New Template 
e Windows 10 build 1607 from Citrix 
e Windows 10 build 1703 from Citrix 
e Windows 10 build 1709 from Citrix 
e Windows 10 build 1803 from Citrix 
e Windows 10 build 1809 from Citrix 
e Windows 10 build 1903 from Citrix 
e Windows 10 build 1909 from Citrix

In the template builder untick all the important once you needed. Once done, click on Save as template to save the custom configuration as an optimizer template.

Machine generated alternative text:
Template Builder 
Windows 10 build 2004 from Citrix 
Z Edit Group Remove Group + New Item A-Z v Z-A 
+ Create A New Group 
Select All 
Disable Services 
40/40 
Remove Built-in Apps 
33/33 
Disable Scheduled Tasks 
53/53 
Miscellaneous 
14/14 
Maintenance Tasks 
3/3 
Optional Components 
0/9 
Rollback 
4/4 
Filter by keyword 
Microsoft.BingWeather 
Microsoft.BingWeather 
Microsoft. DesktopAppInstalIer 
Microsoft.DesktopApplnstaller 
Microsoft.GetHeIp 
Microsoft.GetHelp 
Microsoft.Getstarted 
Microsoft.Getstarted 
Microsoft.HEIFImageExtension 
Adds support for High Efficiency Image File (HEIF) format, usually with .heif
Machine generated alternative text:
Save as new Template...

Provide a display name, description and Click on Done to create the template. Save the template to the respective folder once prompted.

Machine generated alternative text:
Version: 
1.0 
31 DODCAB-C85D-4FF9-A209-9517FD4AF758 
Display Name: 
WVD-WIO 20H1 
Description: 
Customized Optimisation for WVD 20H1 Windows 10 master imag 
Author: 
amal.abraham@vdicloud.tech 
Supported Modes: O 
Analyze 
Execute 
Z Edit Condition 
Rollba

Executing the Optimizer via GUI

For executing the template as GUI, Click on Local templates–> navigate to the custom template you created and click on Optimize.

Machine generated alternative text:
Local Templates 
Template Marketplace 
History 
Recent Files 
Template Builder 
Category 
OS Optimizations 
Template 
Windows 10 build 1909 from Citrix 
Windows 10 version 20H2 (2009) from Citrix 
Windows 7 SPI from Citrix 
Windows 8.1 from Citrix 
Windows Server 2008 R2 from Citrix 
Windows Server 2012 R2 from Citrix 
e Windows Server 2016 build 1607 from Citrix 
e Windows Server 2019 build 1809 from Citrix 
WVD-WIO 20H1
Machine generated alternative text:
Analyze 
Optimize

The script will automatically run and optimize your WVD master image. The results will be displayed once the execution completes. You can click on Analyze to verify if any optimization has been performed. The below screenshot has been taken before optimizing the master image.

Machine generated alternative text:
Analysis complete. 124 entries have failed View results 
10 optimized of 137

Executing Citrix Optimizer via Command line

Citrix Optimizer comes with a PowerShell script which can be used to execute Citrix Optimizer via command line. This is so cool and I am already  using the command line execution as part of my Terraform and Azure DevOps pipelines. 🙂

You need to provide the source and Mode as mandatory parameters.

    .\CtxOptimizerEngine.ps1 -Source C:\Temp\WVD.xml -Mode Execute
Machine generated alternative text:
xoptimizer\ 
izer> . \CtxOptimizerEngine.ps1 
2004. xml 
-Source . 
\Temp1ates\WVD 
Windows 
10 
-Mode 
execute 
-OutputHtm1 
c : \temp\ctx\optimize. html

The below diagram shows the Citrix optimizer script execution result in “Analyze Mode”

Machine generated alternative text:
PS C:\Users\ 
2004. xml 
I Citrix Optimization Engine I 
I Version 2.7 
Running in analyze mode 
. \CtxOptimizerEngine . PSI 
-Source . 
\Temp1ates\WVD 
Windows 
10 
-Mode 
analyze 
-OutputHtm1 
c : \temp\ctx\optimize. html 
creating Logs folder 2021-03-26 18-55-30 
Starting session log 
Checking permissions 
processing definition file 
Adding CTXOE modules 
. Windows 10 2004. xml 
schemaversion 
version 
id 
displayname 
description 
category 
author 
lastupdatedate 
Group : 
2.0 
1.0 
31DODCAB-C85D-4FF9-A209-9517FD4AF758 
WVD-WIO 20H1 
Customized Optimisation for WVD 20H1 Windows 10 master image 
OS Optimizations 
amal.abraham@vdicloud.tech 
3/26/2021 
Disable Services 
Group ID: Disableservices 
AllJoyn Router Service 
Desired startup type Disabled, current type Manual 
Application Layer Gateway Service 
Desired startup type Disabled, current type Manual 
AVCTP service 
Desired startup type Disabled, current type Manual 
BitLocker Drive Encryption Service 
Desired startup type Disabled, current type Manual 
Block Level Backup Engine Service 
Desired startup type Disabled, current type Manual 
Bluetooth Audio Gateway Service 
Desired startup type Disabled, current type Manual 
Bluetooth Support Service 
Desired startup type Disabled, current type Manual

Hope you will find this blog useful. Please let me know if you have any comments or suggestions.

Regards,

Amal K Abraham

WVD Community Member

Workplace Architect

One thought on “Optimize WVD Master Image using Citrix Optimizer

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 )

Facebook photo

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

Connecting to %s