The Windows Update Client Troubleshooting Guide

choubertsprojects

The Best WordPress plugins!

1. WP Reset

2. WP 301 Redirects

3. WP Force SSL

The Windows Update client is a really useful tool for keeping the software on your computer up to date and secure. If you ever run into problems with it, we have some troubleshooting steps that should help get things right again!

The “windows update troubleshooter” is a guide that helps users troubleshoot problems with the Windows Update Client. The troubleshooting guide also includes information on how to fix common issues.

The Windows Update Client Troubleshooting Guide

Windows updates are an important part of both the client and server versions of Windows. They are designed to be automated and keep Windows safe. That automated nature quickly changes when you need to erase a Windows Update cache or deal with a “Windows Update Client failed to identify with issue.”

You’ll learn how to troubleshoot Windows Updates at the client level in this post. You’ll learn (at a high level) how Windows Updates operate, how to do basic troubleshooting using logs, and how to resolve typical Windows Update difficulties.

Prerequisites

To verify that all of the stages in this video apply to you, make sure you have the following:

  • A computer running Windows 7 or Windows Server 2012 — This lesson was created in a Windows 10 Build 1909 environment, although Windows 7 (and maybe previous versions) will also function.
  • As an administrator user, I logged onto Windows. Some commands will need to be executed as administrator.

How to Use PowerShell as an Administrator

Windows Update Agent (WUA) (WUA)

When it comes to Windows Update issues, the Windows Update agent is the main cause. The agent is in responsible of organizing updates detection, download, and installation. The agent is a DLL library named wuaueng.dll that is stored in C:WindowsSystem32 and coordinates the Windows Update service (wuauserv).

It was sometimes required to upgrade the agent to a newer version on Windows 8.1/Windows Server 2012 and previous operating systems. Although it’s significantly less frequent and required to update the agent, if you’re using an older operating system, you should make sure it’s up to date.

To check whether your machine has the agent version installed, go to:

  1. Open File Explorer in Windows.
  2. Go to the C:WindowsSystem32 directory.
  3. Right-click on the wuaueng.dll file and choose Properties.
  4. Click the Details tab in the Properties panels, as shown below. The File version of WUA will be used.

Property Window InformationProperty Window Information

The WUA will usually be at the most recent version with Windows 10 and subsequent editions. Check the Microsoft manual for further information.

How to Resolve Windows Update Problems

Instead of going into the history of Windows Updates, let’s go right to the point. Let’s look at how to delete the Windows update cache and perhaps repair some of those pesky “Windows Update Client failed to identify with error” problem messages.

Recreate the problem and examine the Windows Update log

You must be able to duplicate any computer problem in order to troubleshoot it. Finding a solution to an issue that appears out of nowhere might be one of the most frustrating chores imaginable.

Before you make any changes to your computer, you should run a complete update. If you have automated downloads and installation enabled, this update procedure will identify available updates and download and install them.

To begin the Windows 10 upgrade, follow these steps:

  1. Start typing powershell in the Start Menu.
  2. Run as Administrator by right-clicking on Windows PowerShell.
  3. Create a new COM object that auto-updates in your PowerShell console and call the DetectNow() function. You may use PowerShell to execute the procedure that starts the Windows Update agent by using the COM object that auto-updates.

(New-Object Microsoft.Update.AutoUpdate -ComObject Microsoft.Update.AutoUpdate) DetectNow()

4. As you can see, the COM object that auto-updates offers other methods that may be useful in the future.

COM object that auto-updatesCOM object that auto-updates

If you’re using Windows 8.1/Server 2012 or earlier, you may use the /detectnow option with the Windows Update client (C:WindowsSystem32wuauclt.exe). This switch has been superseded by PowerShell in Windows 10.

There should be no output when you perform the PowerShell command above. What evidence do you have that it had any effect? Examine the Windows Update history.

5. Run the Command Get-WindowsUpdateLog while remaining in PowerShell. This command saves all Windows Update events in the current directory to a WindowsUpdate.log text file.

1647493906_542_The-Windows-Update-Client-Troubleshooting-GuideCommand Get-WindowsUpdateLog

Windows 10 generates diagnostic logs using event tracing for Windows (ETW). The C:WindowsSystem32WindowsUpdate.log log file can no longer be accessed directly.

6. Look at the The file WindowsUpdate.log for a few lines that look like this. When the WUA starts, these lines appear. Scroll down from here to check if there are any issues.

The file WindowsUpdate.logThe file WindowsUpdate.log

Confirm that critical services have begun.

For Window Updates to work properly, four Windows services are required:

Updates will not operate if any of the aforementioned services (excluding Windows Installer) are disabled.

Use the Windows Services Manager option or PowerShell to check on key services. Let’s use PowerShell since you’re probably already using it.

Use the Get-Service PowerShell command to verify the status of each service, as illustrated below.

wuauserv,bits,cryptsvc -Name Get-Service

Both services have a Status of Running, as seen below. You’ll have to start them if you don’t see this.

Get-Service with Running or StatusGet-Service with Running or Status

To start the services, use the Up arrow on your keyboard to bring up the previous command, then add the Start-Service command at the end, as seen below.

wuauserv,bits,cryptsvc -Name Get-Service | Start-Service

How to Use PowerShell to Manage Windows Services

Windows Update Cache Cleaning

If the services are working but Automatic Updates are still failing, it’s time to erase the Windows Update cache. When Windows downloads and installs updates, it also downloads metadata and may cache the binaries.

You may apply varying degrees of intrusiveness to this method depending on what you identify as the “cache.” Start with the least obtrusive option and try again. If the issue persists, go on to the next troubleshooting step.

Qmgr DAT Files are being removed.

One of the most least intrusive ways of Windows Update Cache Cleaning is to remove all qmgr files from %ALLUSERSPROFILE%Application DataMicrosoftNetworkDownloader folder. But first, you must stop all of the applicable services mentioned above.

wuauserv,bits,cryptsvc -Name Get-Service | Stop-Service

Run the following commands once you’ve stopped all of the services:

$env:ALLUSERSPROFILEApplication DataMicrosoftNetworkDownloaderqmgr*.dat Remove-Item -Path

You may encounter an error message saying “The process cannot access the file because it is being utilized by another process” while trying to delete qmgr files. If this is the case, reboot your computer and try again. If the problem persists, restart your computer in safe mode and try again.

All cache updates should be removed by PowerShell. Restart the services when it’s finished, and cross your fingers!

wuauserv,bits,cryptsvc -Name Get-Service | Start-Service

Resetting the Windows Update Cache: Going Nuclear

If the steps above haven’t worked, it’s time to go nuclear. It’s time to restore the default settings for the whole Windows Update caching system.

The “Window Update cache” is a collection of components rather than a single component. You were just altering the services and file system in the previous parts. Windows Update also contains registry settings and registers a variety of DLL files.

Let’s go through a PowerShell script that will reset the Windows Update cache, making any required registry changes, removing any cached updates, and dealing with some typical Windows Server Update Services difficulties (WSUS).

To execute the script, follow these steps:

  1. Start typing ise into your start menu.
  2. Right-click PowerShell ISE and choose Run as Administrator from the context menu.
  3. Then choose Show Script Pane from the View menu. This action should provide a window where you can type your script.
  4. In the script window, paste the script below.

Write-Host ‘Stopping all necessary services…’ wuauserv,bits,cryptsvc -Name Get-Service,msiserver | Stop-Service Write-Host ‘Removing all qmgr.dat files…’ $env:ALLUSERSPROFILEApplication DataMicrosoftNetworkDownloaderqmgr*.dat Remove-Item -Path Write-Host ‘Backing up Windows Update cache folders…’ Rename-Item -Path “$env:SYSTEMROOTSoftwareDistributionDataStore” -NewName ‘DataStore.bak’ Rename-Item -Path “$env:SYSTEMROOTSoftwareDistributionDownload” -NewName ‘Download.bak’ Rename-Item -Path “$env:SYSTEMROOTSystem32catroot2” -NewName ‘catroot2.bak’ Write-Host ‘Resetting BITS and Windows Update services security descriptors…’ $null = Start-Process -FilePath ‘sc.exe’ -ArgumentList ‘sdset bits D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;AU)(A;;CCLCSWRPWPDTLOCRRC;;;PU)’ $null = Start-Process -FilePath ‘sc.exe’ -ArgumentList ‘sdset wuauserv D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;AU)(A;;CCLCSWRPWPDTLOCRRC;;;PU)’ Write-Host ‘Re-registering all requisite DLLs…’ $dlls = @( ‘atl.dll’ ‘urlmon.dll’ ‘mshtml.dll’ ‘shdocvw.dll’ ‘browseui.dll’ ‘jscript.dll’ ‘vbscript.dll’ ‘scrrun.dll’ ‘msxml.dll’ ‘msxml3.dll’ ‘msxml6.dll’ ‘actxprxy.dll’ ‘softpub.dll’ ‘wintrust.dll’ ‘dssenh.dll’ ‘rsaenh.dll’ ‘gpkcsp.dll’ ‘sccbase.dll’ ‘slbcsp.dll’ ‘cryptdlg.dll’ ‘oleaut32.dll’ ‘ole32.dll’ ‘shell32.dll’ ‘initpki.dll’ ‘wuapi.dll’ ‘wuaueng.dll’ ‘wuaueng1.dll’ ‘wucltui.dll’ ‘wups.dll’ ‘wups2.dll’ ‘wuweb.dll’ ‘qmgr.dll’ ‘qmgrprxy.dll’ ‘wucltux.dll’ ‘muweb.dll’ ‘wuwebv.dll’ ) foreach ($dll in $dlls) { regsvr32.exe “$env:SYSTEMROOTSystem32$dll” /s } Write-Host ‘Removing WSUS registry values…’ @(‘AccountDomainSid’,’PingID’,’SusClientId’,’SusClientIDValidation’) | ForEach-Object { Remove-ItemProperty -Path “HKLM:SOFTWAREMicrosoftWindowsCurrentVersionWindowsUpdate” -Name $_ -ErrorAction Ignore } ## Resets computer group membership Write-Host ‘Resetting WSUS client cookie..,’ $null = wuauclt.exe /resetauthorization Write-Host ‘Starting all necessary services…’ wuauserv,bits,cryptsvc -Name Get-Service | Start-Service Write-Host ‘Initiating update cycle…’ (New-Object Microsoft.Update.AutoUpdate -ComObject Microsoft.Update.AutoUpdate) DetectNow() Write-Host ‘Windows Update reset complete.’

5. Click on File —> Save and save the script somewhere on your computer. This tutorial will assume it’s in C:FixWindowsUpdates.ps1.

6. To launch the script, click the green triangle on the PowerShell ISE.

Execute the ScriptExecute the Script

If you prefer a graphical user interface, you may also discover an utility that does the same functions. However, I’m not sure whether it covers the same stages as the PowerShell script above.

Conclusion

It takes a lot of work to get required updates to download and install automatically in the background on a Windows PC. Despite the fact that you may see thousands of different error messages, the ideas and scripts you’ve learned in this tutorial should help you fix them all.

The “windows update reset (fix it) tool download” is a command-line tool that allows users to reset the Windows Update Client. The tool also has an option to check for updates and clear out any temporary files left behind from previous attempts.

Related Tags

  • windows update troubleshooter windows 7
  • windows troubleshooter not working
  • windows 10 update fix tool
  • the update is not applicable to your computer windows server 2012 r2
  • check for windows update issues detected

Table of Content