I have had this issue on my work PC and found that errors reporting an invalid handle can arise from Windows Update running in its own process.

You can try checking if Windows Update is running in its own process, and if it is, set it to share and reboot.

To check if it is in its own process, you can run sc query wuauserv in an elevated command prompt, and check what TYPE is reported. For example, one that is is set to run as its own process will look like this:

Microsoft Windows [Version 10.0.14393]
(c) 2016 Microsoft Corporation. All rights reserved.

C:\WINDOWS\system32>sc query wuauserv

SERVICE_NAME: wuauserv
        TYPE               : 10  WIN32_OWN_PROCESS
        STATE              : 4  RUNNING
                                (STOPPABLE, NOT_PAUSABLE, ACCEPTS_SHUTDOWN)
        WIN32_EXIT_CODE    : 0  (0x0)
        SERVICE_EXIT_CODE  : 0  (0x0)
        CHECKPOINT         : 0x0
        WAIT_HINT          : 0x0

To set it to shared (as it should be), run sc config wuauserv type= share, then reboot your PC (reboot is necessary because of some issue with SIDs not being correct without bringing down the shared process).

Once done, Windows Update should be working (provided there is nothing else wrong with it) and running sc query wuauserv should return a TYPE of 20 WIN32_SHARE_PROCESS.


Lack of SeDebugPrivilege in wuauserv service RequiredPrivileges registry setting could be the reason of 80070006 error. Try to add SeDebugPrivilege at end of RequiredPrivileges list then restart wuauserv service. The setting is available at :

Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\wuauserv

I don't know the reason but in our network this privilege is set in most of Windows Server 2019 by default but not set in 2016 ones.

Be aware as discussed here SeDebugPrivilege is the highst access permission you could give to a user. Use it at you own risk.