A while ago I created a Citrix Optimizer custom template for Windows Server 2016 build 1607. You are welcome to use or modify this template as you see fit.
15.03.2019: updated article as well my custom template for Windows Server 2016 to version 184.108.40.206 of Citrix Optimizer.
|Note: for detailed information about Citrix Optimizer and a detailed explanation on how to build you own template see the article Creating a custom template for Citrix Optimizer on this website.|
Table of Contents
Before diving into the details, this is what the customized GUI looks like.
When you add my template in the subdirectory Templates of the Citrix Optimizer installation root it is automatically loaded.
When opening the template, you can see that it starts out the same as the original Windows Server 2016 template provided by Citrix. I used this template as a baseline to create my own. The last four sections are custom sections.
As said, the template is based on a copy of the original template for Windows Server 2016 (Citrix_Windows_Server_2016_1607.xml).
The first thing I did after copying the original Windows Server 2016 template was to remove the section Optional Components as shown in the screenshot below.
Than I added the following sections:
In my humble opinion, optimizations should reflect the use-case. Not all optimizations are required or even recommended in all scenarios. For sure there are optimizations that fit all environments, operating systems and deployment methods, but some optimizations should only be applied in certain circumstances. For example:
- DS: NON-PERSISTENT Only
This section contains optimizations that are only required for non-persistent workers (as opposed to persistent workers).
- Citrix Optimizer Supplement for App Layering
There are two ways how you can download the template.
First of all you can download this template in the Citrix Community Marketplace created by Citrix CTP Ryan Butler. To connect to this marketplace, go to Template Marketplace in the GUI, click on +Add New Marketplace and enter the following URL:
For more information on the Template Marketplace component in Citrix Optimizer see my article Creating a custom template for Citrix Optimizer.
Secondly, you can download the template here:
Simply copy this template in the Templates folder of Citrix Optimizer as described in the section An overview of a Citrix Optimizer template in my article Creating a custom template for Citrix Optimizer.
After importing the template you see it in the GUI:
Now let's go through each of the custom sections to see which optimizations are included.
In this section both the 32-bit and 64-bit Active Setup are disabled.
The main issue with Active Setup is that it is only executed on published desktops, not published applications. This leads to inconsistent configurations between users. Also, a user can live without the Active Setup window that appears at first logon in the top left corner of the screen. See Citrix CTP Helge Klein's article Active Setup Explained for more information.
There are various ways how to disable Active Setup. I choose to rename both the 32-bit and 64-bit registry keys. Renaming the parent registry key automatically disables all individual Active Setup entries beneath it. One big advantage is that you do not need to worry about disabling individual settings.
Original key names:
- HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Active Setup\Installed Components
- HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Active Setup\Installed Components
Key names after being renamed (and thus disabled):
- HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Active Setup\_DISABLED Installed Components_2018-11-10_10-24-11
- HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Active Setup\_DISABLED Installed Components_2018-11-10_10-24-11
The new name of the registry keys includes a time stamp. The advantage of this approach is that this makes the key name unique. Without a unique name, an error would be thrown when you execute this optimization for a second time. The simple reason being that you cannot use the same name twice.
To disable Active Setup I use the PowerShell plugin included in Citrix Optimizer. Please see the section PowerShell: rename a registry value in my article Creating a custom template for Citrix Optimizer for more details on the PowerShell code used.
This optimization does not include rollback.
In this section I disable a number of additional services that are not disabled by Citrix Optimizer by default.
The following services are disabled:
- App Readiness (service name: AppReadiness)
Note: this can cause issues with Windows Update.
Gets apps ready for use the first time a user signs in to this PC and when adding new apps. This service causes black screen issues on Windows Server 2016. This saved me 14 seconds logon time!
- Device Setup Manager (service name: DsmSvc)
Enables the detection, download and installation of device-related software. If this service is disabled, devices may be configured with outdated software, and may not work correctly.
- WAP Push Message Routing Service (service name: dmwappushsvc)
WAP Push Message Routing Service.
- Network Connection Broker (service name: NcbService)
Brokers connections that allow Microsoft Store Apps to receive notifications from the internet.
- Program Compatibility Assistant Service (service name: PcaSvc)
This service provides support for the Program Compatibility Assistant (PCA). PCA monitors programs installed and run by the user and detects known compatibility problems. If this service is stopped, PCA will not function properly.
- Quality Windows Audio Video Experience (service name: QWAVE)
Quality Windows Audio Video Experience (qWave) is a networking platform for Audio Video (AV) streaming applications on IP home networks. qWave enhances AV streaming performance and reliability by ensuring network quality-of-service (QoS) for AV applications. It provides mechanisms for admission control, run time monitoring and enforcement, application feedback, and traffic prioritization.
- Radio Management Service (service name: RmSvc)
Radio Management and Airplane Mode Service.
- Sensor Data Service (service name: SensorDataService)
Delivers data from a variety of sensors.
- Sensor Service (service name: SensorService)
A service for sensors that manages different sensors' functionality. Manages Simple Device Orientation (SDO) and History for sensors. Loads the SDO sensor that reports device orientation changes. If this service is stopped or disabled, the SDO sensor will not be loaded and so auto-rotation will not occur. History collection from Sensors will also be stopped.
- WalletService (service name: WalletService)
Hosts objects used by clients of the wallet.
- Windows Error Reporting Service (service name: WerSvc)
Allows errors to be reported when programs stop working or responding and allows existing solutions to be delivered. Also allows logs to be generated for diagnostic and repair services. If this service is stopped, error reporting might not work correctly and results of diagnostic services and repairs might not be displayed.
- Windows Insider Service (service name: wisvc)
Provides infrastructure support for the Windows Insider Program. This service must remain enabled for the Windows Insider Program to work.
To disable these services I use the Services plugin included in Citrix Optimizer. For more information on how to use this plugin see the section Custom entry for Services in my article Creating a custom template for Citrix Optimizer.
In this section I optimize a couple of miscellaneous settings.
The following configurations can be made on any image independent of how the image is deployed, whether it is persistent or not and whether the machine is a virtual or physical machine.
- Disable Cortana
Disabling Cortana is accomplished by changing the following registry value:
- Key: HKLM\SOFTWARE\Policies\Microsoft\Windows\Windows Search
- Name: AllowCortana
- Value: 0
- Type: DWORD
- Disable Customer Experience Improvement Program (CEIP)
Disabling CEIP is accomplished by changing the following registry value:
- Key: HKLM\SOFTWARE\Microsoft\SQMClient\Windows
- Name: CEIPEnable
- Value: 0
- Type: DWORD
- Disable Data Execution Prevention (DEP)
It is best practice to disable DEP (see the Citrix Windows 10 Optimization Guide).
To disable DEP I use the PowerShell plugin included in Citrix Optimizer. I use PowerShell code to execute the command bcdedit.exe /set nx AlwaysOff. For more information on exactly how DEP is disabled using PowerShell and bcdedit.exe see the section PowerShell: run an executable in my article Creating a custom template for Citrix Optimizer.
- Disable Hibernate
Hibernation is pretty useless on a machine that runs in the data center and can therefore be disabled. Disabling Hibernate is accomplished by changing the following registry value:
- Key: HKLM\SYSTEM\CurrentControlSet\Control\Power
- Name: HibernateEnabled
- Value: 0
- Type: DWORD
- Disable IPv6
Disabling IPv6 is accomplished by changing the following registry value:
- Key: HKLM\SYSTEM\CurrentControlSet\Services\Tcpip6\Parameters
- Name: DisabledComponents
- Value: 255 (decimal)
- Type: DWORD
Please be aware that the optimization Disable Data Execution Prevention in this section does not include rollback.
In this section I added optimizations that apply to non-persistent scenarios only. Non-persistent means that changes to the local machine are not retained; when the machine reboots, all changes are lost.
You want to include the settings in this section to your image when you plan to deploy this image to non-persistent virtual machines, for example using technologies such as Citrix Machine Creation Services (MCS) or Citrix Provisioning Server (PVS). The deployment technology is not relevant; these settings apply to all non-persistent scenarios.
There are two main reasons to exclude or change settings for non-persistent machines:
- The setting or configuration is not relevant, because of the fact that settings are not retained (thus are lost when the machine is rebooted).
- The setting or configuration takes up space in temporary memory, whether it is a virtual hard disk (a cache disk) or RAM. You want to keep the usage of this temporary memory to a minimum.
Let's take a look at exactly which settings are included:
- Disable clear page file at shutdown
There is no need to clear the page file when it "cleared" anyway at the next reboot. Clearing the page file is accomplished by changing the following registry value:
- Key: HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management
- Name: ClearPageFileAtShutdown
- Value: 0
- Type: DWORD
- Disable Machine Account Password Changes
Machine account password changes would get lost on the next reboot. Therefore it is necessary to disable it. This is accomplished by changing the following registry value:
- Key: HKLM\SYSTEM\CurrentControlSet\Services\Netlogon\Parameters
- Name: DisablePasswordChange
- Value: 1
- Type: DWORD
- Disable Move to Recycle Bin
Disable Move to Recycle Bin is accomplished by changing the following registry value:
- Key: HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer
- Name: NoRecycleFiles
- Value: 1
- Type: DWORD
- Disable System Recovery
It is best practice to disable System Recovery (see the Citrix Windows 10 Optimization Guide). To disable System Recovery I use the PowerShell plugin included in Citrix Optimizer. I use PowerShell code to execute the command bcdedit.exe /set recoveryenabled no. For more information concerning the PowerShell code see the section PowerShell: run an executable in my article Creating a custom template for Citrix Optimizer.
- Native Image Generation (NGEN.exe) 32-bit and 64-bit
THIS IS SLOW, it's normal for this operation to take a long time (about 2 minutes on a clean Windows Server 2016 version 1607). This optimization pre-compiles .NET assemblies instead of using the just-in-time compilation using NGEN.exe. Does not support analyze/rollback modes, but it is generally safe to use.
Note: the status of this setting is always displayed as "optimized" within Citrix Optimizer. Please ignore this status and always execute this item when sealing your image. I copied the PowerShell code from the official Windows 10 version 1803 template included in Citrix Optimizer.
In case you are preparing your image using Citrix App Layering, you can use the template offered in this article. However, after optimizing all settings using my template, you should run Citrix Optimizer a second time using the App Layering Supplement template create by Citrite Rob Zylowski.
You can download this template from Sharefile: https://citrix.sharefile.com/share/view/s3aabe5b29a04859b
You should also read Rob's article Optimizing Windows and Citrix App Layering on the official Citrix Blogs website.
This template is by no means complete. Also, this template contains my personal list of recommended optimizations and should work for all organizations. I do however recommend you to test this template thoroughly before using it in production. The responsibility of using this template lies solely with you.
I also urge you to take a look at the optimizations recommended by other esteemed bloggers:
- CTP George Spiers - Windows Server 2016 Optimisation Script
- CTA and Citrite Daniel Feller - Windows Server 2016 Optimizations for Citrix XenApp
- CTA David Wilkinson - Citrix Virtual Apps and Windows Server 2016 – Optimisation Script
Use one of the Citrix standard templates, a template from the marketplace or create your own template. Just make sure that you optimize your image!