Usually, when you want to control the Windows Update settings, you create a GPO to manage the settings or tweak some registry entries. Both methods alter the registry values in the registry key
HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate
Code language: plaintext (plaintext)
To reset any custom Windows Update settings, I nuke out that registry key or reverse the GPO or both, and restart the Windows Update service, and everything would be good. However, that process stopped working consistently.
At some point, Microsoft tweaked something, and now there’s a scheduled task named Refresh Group Policy Cache. It’s unclear which update added this to systems, but it impacts Windows 10, Windows 11, and Windows Servers.
What is Refresh Group Policy Cache?
The Refresh Group Policy Cache is a scheduled task in the task scheduler under Microsoft > Windows > WindowsUpdates. It seems to be a custom scheduled task that uses the DLL %systemRoot%\system32\updatepolicy.dll
.
I don’t know everything the DLL does but what I do know is that it is a Microsoft DLL, and its internal name is Update Policy Reader. I tried to find more information about it, but there isn’t much, and I’m not good at decompiling DLLs.
I did find the MUI file for the DLL. The MUI has a list of strings that provide an idea of the DLL’s purpose.
100 None<br />101 Set branch readiness level<br />102 Set period to defer Feature Update<br />103 Set period to defer Quality Update<br />104 Enable Update Pause<br />105 Branch readiness level<br />106 Enable Quality Update deferral<br />107 Quality Update deferral period<br />108 Enable Feature Update deferral<br />109 Feature Update deferral period<br />110 Pause Feature Updates<br />111 Pause Quality Updates<br />112 Exclude drivers from Windows Quality Updates<br />113 Start date for pausing Quality Updates<br />114 Start date for pausing Feature Updates<br />115 End date for pausing Quality Updates<br />116 End date for pausing Feature Updates<br />117 Enable Auto Restart deadline<br />118 Auto Restart deadline<br />119 Auto Restart deadline for Feature Updates<br />120 Disable check for updates by user<br />121 Enable Active Hours maximum range<br />122 Active Hours maximum range<br />123 Enable the method by which the auto restart required notifications are dismissed<br />124 Dismissal method for auto restart required notifications<br />125 Configures Auto Restart reminder schedule<br />127 Time period for displaying Auto Restart reminder notification<br />128 Turn off Auto Restart notification<br />129 Configure Auto Restart deadline warning notifications schedule<br />130 Time period for displaying Auto Restart deadline reminder notification<br />131 Time period for displaying Auto Restart deadline warning notification<br />133 Enable Auto - restart to Engaged restart transition schedule<br />134 Auto restart to Engaged restart transition schedule<br />135 Engaged restart snooze schedule<br />136 Engaged restart deadline<br />137 Auto restart to Engaged restart transition schedule for Feature Updates<br />138 Engaged restart snooze schedule for Feature Updates<br />139 Engaged restart deadline for Feature Updates<br />140 Enable skipping battery checks for EDU devices<br />141 Allow updates to be downloaded automatically over metered connections<br />142 Do not allow update deferral policies to cause scans against Windows Update<br />143 Disable Pause updates by user<br />144 Enable automatic wake up to install scheduled updates<br />145 Display options for update notifications<br />146 Specifies the number of days before Quality Updates are installed on a device automatically<br />147 Specifies the number of days before Feature Updates are installed on a device automatically<br />148 Allows device to have an additional grace period until restarts occur automatically for Quality Update installation<br />149 Do not attempt to auto reboot device outside of active hours before the deadline is reached<br />150 Target Version for Feature Updates<br />151 This setting specifies that a device that is configured with DeferFeatureUpdatesPeriodInDays or BranchReadinessLevel policies to skip safeguards.<br />152 Allows device to have an additional grace period until restarts occur automatically for Feature Update installation<br />1000 Microsoft Corporation.<br />1001 This task is used to refresh group policy cache in Windows Update
Code language: Basic (basic)
By playing around, I think I have a basic idea of what the scheduled task is doing. It seems that the Refresh Group Policy Cache scheduled task queries the values in the registry key
HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate
Code language: plaintext (plaintext)
and duplicates them to a cache location of CacheSet001
or CacheSet002
in the registry key
HKLM:\SOFTWARE\Microsoft\WindowsUpdate\UpdatePolicy\GPCache
Code language: plaintext (plaintext)
What it takes to trigger that scheduled task, I’m not sure.
In my testing, there can only be two cache sets, and only one can be active. The value that controls which cache set is active is the REG_DWORD
named ActiveCache
. The number defined in the data value indicates which cache will be used.
The Issue
The problem with Refresh Group Policy Cache is that sometimes Windows Updates ignores the settings defined in
HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate
Code language: Ada (ada)
and instead honors the settings of the active cache in
HKLM:\SOFTWARE\Microsoft\WindowsUpdate\UpdatePolicy\GPCache
Code language: plaintext (plaintext)
This issue can impact any system with custom Windows Update settings. Also, it impacts systems imaged with ConfigMgr (Microsoft Configuration Manager aka SCCM (System Center Configuration Manager)) task sequences.
…