The global health pandemic has forced organizations to move rapidly to a remote work model. Not only has it been necessary to quickly find solutions to let employees work remotely but it has also required IT departments to get more out of existing solutions, like virtual desktop infrastructure (VDI) and Windows Virtual Desktop (WVD). In this article, we’ll look at a rebranded tool from Microsoft’s ‘The VDI guys‘ that you can use to optimize Windows 10 virtual machines (VM).
The Virtual Desktop Optimization tool is not completely new, but it is a rebranded version of the Windows 10 Optimizer written by Microsoft’s Robert M. Smith and Tim Muessig (The VDI guys). The tool works with multi and single-session deployments in Windows Virtual Desktop. And it supports Windows 10 versions 1909 and 2004 at the time of writing this article.
It’s worth noting that while the tool was developed by Microsoft employees, it is not an official Microsoft product. As such, it is not supported by Microsoft. Although it is possible that sometime in the future that the tool might get an official release by the Windows Virtual Desktop team.
The optimization tool is provided as a free PowerShell script. You can download it from GitHub here. Many of the optimizations performed by the tool are outlined in an article on Microsoft’s website: Optimizing Windows 10, version 1909, for a Virtual Desktop Infrastructure (VDI) role. The tool performs various optimizations including:
Like any configuration changes to Windows, you must test the optimization script to make sure that it doesn’t cause operational issues or compatibility problems with line-of-business applications. While there isn’t yet a full list of the changes the script makes, Microsoft is planning to publish a full list of the optimizations for native Windows system services on its site here.
The script should be used only after sysprep is run to generalize your Windows image. If you have many images that need optimizing, you can configure the script to run as a Group Policy ‘startup’ script. Follow the instructions below to run the script on your Windows 10 image.
cd c:\optimize Set-ExecutionPolicy -ExecutionPolicy ByPass .\Win10_VirtualDesktop_Optimize.ps1 -WindowsVersion 2004 -Verbose Restart-Computer -Force
In my unscientific before and after comparison, you see that in the figure below, the device now runs with many less threads, processes, and open handles (right image) than before the tool was run (left image).
LoginVSI has published a more thorough test of how running the optimization script affects performance. Using VSImax, which calculates a ‘sweet spot’ number of users that can log in to a host pool without degrading performance for all users, LoginVSI was able to increase the number of Windows 10 version 2004 sessions from 153 to 249. For the full set of results, check out LoginVSI’s blog here.
The optimization script takes just 5 to 10 minutes to run. It reduces the overhead required to run Windows 10, so it is worth looking into because you can increase the number of VMs hosted (VM density) by your VDI. Other tools, like Citrix Optimizer and VMware OS Optimization Tool (OSOT) can also be used to optimize Windows 10 for VDI.