Everything you need to know about Windows logons in one blog series continues here!
I have threatened on several occasions now to do a follow-up to my previous article on Windows logon times which incorporates the findings from my “logon times masterclass” that I have presented at a few events. The time has come for me to turn these threats into reality, so this series of articles and accompanying videos will explore every trick we know on how to improve your Windows logon times. As many of you know, I work predominantly in Remote Desktop Session Host (RDSH) environments such as Citrix Virtual Apps and Desktops, VMware Horizon, Windows Virtual Desktop, Amazon Workspaces, Parallels RAS, and the like, so a lot of the optimizations discussed here will be aligned to those sorts of end-user computing areas…but even if you are managing a purely physical Windows estate, there should be plenty of material here for you to use. The aim of this is to provide a proper statistical breakdown of what differences optimizations can make to your key performance indicators such as logon time.
This series of articles is being sponsored by uberAgent, because the most important point to make about logon times is that if you can’t measure them effectively, then you will never be able to improve them! uberAgent is my current tool of choice for measuring not just logons (which it breaks down into handy sections that we are going to use widely during this series) but every other aspect of the user’s experience. All of the measurements in this series are going to be done via uberAgent, and as it comes with free, fully-featured community and consultants’ editions, there’s absolutely no reason that you can’t download it and start using it straight away to assess your own performance metrics. I’ve written plenty about uberAgent on this blog before, and I stand by it as the best monitoring tool out there for creating customized, granular, bespoke consoles that can be used right across the business. I’ve recently deployed it into my largest current client, so you can be sure I am putting my money where my mouth is – if it didn’t do the job, I wouldn’t have used it for my customers, simple as. It now features full Citrix Cloud integration and a “user experience” score to tell you where your users are having issues, so go and try uberAgent right now – you won’t regret it!
Part #6 – Windows 10 trickery
Today, we are going to showcase a few quick logon optimizations that apply specifically to those of you out there dealing with Windows 10 (although they might work on Windows 11 too – too soon to tell!)
UWP apps
I’m sure many regular readers of my blog know that I believe there is a special place in Hell for the creator of the UWP apps paradigm on Windows 10. I think they’re ugly, pointless and very badly implemented, and they create such a drag on first logon times – which, if you do non-persistent Windows 10, can be sometimes every logon.
The problem with UWP apps is that they provision into the user profile at first logon, and it is this that makes non-persistent Windows 10 so hideously non-performant from a logon perspective. I’ve written articles before about how to remove them – see here if you need a refresher, or here if you want a video tutorial – and they’re best removed during the build or prior to image sealing. We won’t touch on disposing of them in this article – we’re just interested in their impact.
Over time, Microsoft have slowly started to move away from UWP apps, and certainly from the huge proliferation of them that we saw in earlier versions. Annoyingly, they still appear in Windows 11, but they’re nowhere near as ubiquitous as they were in previous iterations. We haven’t really got time to test all Windows 10 versions, so for the UWP perspective, we’ve picked on the RTM version, 1709, 1909, and 21H1.
First of all, let’s test the RTM version of Windows 10 with all of its default UWP apps still in the image
Rough! Over two minutes of logon time – small wonder the RTM version of Windows 10 was only deployed by crazy people (including myself, September 2015, I’m claiming first).
How much does it improve after we remove the UWP apps?
That’s a sizeable improvement – and a good indicator of how much UWP overkill there was. 2 minutes 17 seconds is reduced to roughly 45 seconds – still poor but a HUGE improvement.
Next we will repeat the tests with the 1709 version – here’s the logon data with the UWP apps in the image
And here’s the same data with them removed
Much better – 52 seconds with them, 31 seconds without. 1709 is the only Windows 10 version we tested that actually almost classed as a reasonable logon time once you’d removed the UWP crud.
Next we will try the 1909 version, here are the stats with UWP apps…
…and here are the stats with them removed…
Things have not improved – quite the opposite, now over a minute with the apps included and 39 seconds with them removed.
Finally, let’s do the same test for the latest Win10 version, 21H1. Here’s its performance with the out-of-box set of UWP apps
and here is the logon performance when they are taken out of the equation
Even more evidence that Windows 10, as far as logons go, hasn’t improved with age. Windows 10 21H1 logs on at roughly the same speed without the UWP apps as Windows 10 1709 did with them all still present.
I know that sometimes you can’t get rid of all UWP apps and have to leave some – Calculator, Sticky Notes, I’m looking at you – but if you can remove them all, you’ll be much better off. I remove them all at build time and use Chocolatey to restore OldCalc and a Sticky Notes alternative for the users, and they work great.
What conclusions can we draw from these tests? Well, in a nutshell, UWP apps are rubbish, severely impact your KPIs, and you’re better off without them. But also – Windows 10 suffers from pretty poor base logon times in general. Even without the cruft, the latest version takes nearly a minute to complete that first logon. Not good! Is there anything else we can do to help?
Fast First Sign-In
Now, this should be used with care, but I’ve written previously about a little trick called Fast First Sign-In. The details of how to enable it are all in the previous linked article. What you have to be careful of is inadvertently disabling any policies by using this, but as long as you are diligent, it is a viable proposition.
Now Fast First Sign-In is supposed to bypass the UWP apps provisioning process, but what if we apply it to a machine that already has had the UWP apps removed? Will it make any difference?
Once we’ve got it enabled as per the article, let’s take that 1 minute logon without the UWP apps on 21H1 as a baseline and re-run the test. How do the figures stack up now?
OK, that’s pretty good. Fast First Sign-In can shave about 16 seconds off that logon time even if you’ve already binned the UWP apps. Nice!
DelayedDesktopSwitchTimeout
Now, this is another setting you should use with care, but again, if you get it right, it can make a helluva difference – especially in Citrix environments. It’s a simple Registry value that you can add (and it’s supposed to only work on Vista or Server 2008!), which tells the logon process to wait for a shorter time before switching from session 0 to the actual session in use. Interestingly, it’s a Policies value, which made me think there is a GPO that references it – but checking the latest GPO documentation doesn’t reveal a match, so I’m unsure whether it is an undocumented or deprecated setting.
Simply add the following value below to your base image
- Key – HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System
- Value – DelayedDesktopSwitchTimeout
- Type – DWORD
- Data – I normally set this to 1, although Citrix recommend 5….1 seems to work fine for me
Now let’s reset back to before we implemented Fast First Sign-In, and start from the baseline on 21H1 that we had of 59.31 seconds (near enough a minute). If we implement this Registry value, what effect does it have on our logon times? Let’s see…
That’s a big improvement – 21 seconds or so. Wow!
Combining things
So….what if we apply both DelayedDesktopSwitchTimeout and Fast First Sign-In to our Windows 10 21H1 machine that was logging on in about a minute after the UWP apps were removed? Will we get a cumulative benefit? Let’s find out…
Hell yeah! We’ve now come down from 1 minute to around 23 seconds – that’s a damn fine improvement. If you look at the difference DelayedDesktopSwitchTimeout made (21 seconds), that’s also the difference between Fast First Sign-In’s effect and the cumulative effect, so they’re clearly both making an impact.
Summary
If you’re using Windows 10, the chances are your logon times are a bit poor, especially in non-persistent environments. Combining the UWP app removal with Fast First Sign-In and the DelayedDesktopSwitchTimeout Registry value can take you from around a minute (which is pretty poor and noticeable to the users) down to 23 seconds (which is well within the “green” zone). Even if you’re not non-persistent, this really takes the sting out of that first drawn-out logon.
Stay tuned for part #7 of this series where we are going to have a look at Active Setup.
Is your recommendation for DelayedDesktopSwitchTimeout specific to Windows 10? It appears that on a server OS 2016/2019 that it’s already set to 0. ATM, I’m not sure if a value of 0 means it’s turned off or there is no timeout.
Hi Brandon
I’ve never seen it make much difference on Server 2019, but you can easily roll the dice and test it I guess. Unless you’re seeing an unexplained delay, then probably best to leave it out if I had to make a recommendation.
One caveat with setting DelayedDesktopSwitchTimeout to 1 on win10 is the welcome message at login disappears right away as this setting switches from session 0 to the new account displaying a black screen while explorer loads. 5 or 10 makes a better value as the user gets to see some feedback instead of a black screen.
In my opinion I don’t care about the welcome screen as long as the logon is snappier. Feedback is overrated, IMHO