[Autogenerated] Resetting the Windows update components
is necessary when you run into issues, downloading or installing patches,
corrupted update files,
missing metadata and service failures are common problems
that require a full rebuild and reset.
The key steps are to stop the Windows update service,
delete the software distribution folders to clear the cache,
reset the update services and components and then re enable
the services to trigger a fresh update.
Scan PowerShell makes this process easier with the PS Windows update module.
This community module provides commands to rebuild Windows update,
install Windows update and to find Windows updates,
resetting Windows updates requires rebuilding key
components and data to resolve corruption.
So we're going to use the PS Windows update module in PowerShell to
simplify that process and avoid manual steps coming up.
We'll put our Windows update, troubleshooting skills to work in a practical demo.
We'll find failed updates diagnose why they failed.
And then we use the PS Windows update module to reset the environment.
All right,
it's time to see how we can leverage PowerShell to
troubleshoot and recover from failed Windows updates.
So I'm here to my Windows 10 machine that's been having some trouble
with the recent .NET Framework cumulative update,
it's failing to install.
So before we get started,
we need to install the PS Windows update module from the PowerShell gallery.
This module is a lifesaver when managing updates with PowerShell.
Now that the module is installed and ready to use,
let's start digging in and see what's going on.
So first things first,
we should check the update history for any failed updates and
through that you can use the git Windows update history command
in the PS Windows update module.
And here I'm just ping this,
we object to only finding the updates that were not succeeded.
All right.
And there it is that is the .NET Framework
cumulative update that failed to install.
Um Let's see what caused that.
Let's let's check to see the Windows update service status first.
Ah, the service has stopped.
That's would definitely block of data from being installed.
Let's start this service back up and see if this will fix it.
Hm That's odd.
It's not starting.
Um Something must be preventing the service from starting up in cases like this.
It's best to just reset the Windows updates components
completely to recover from any issues.
I could go at this like a surgeon in my experience going with the Scorch
Earth method approach is much easier when it comes to Windows updates
because there is a lot to Windows updates.
So luckily with the PS Windows update module,
it includes a command called reset W components and this
will go through and stop services, start services,
delete any corrupted data re-register components
and just refresh the environment.
It will do everything needed to completely reset everything.
It does a ton of things under the covers as you can see here.
So now it says we must restart the machine.
So I'll go ahead and do that now and i'll be back when it comes back.
All right, we are back now with a clean slate.
Let's check the Windows update service again.
Much, much better.
It's now started.
Let's go ahead and check for any pending updates.
We can do that with the Get Windows update command.
That's part of the PS Windows update module.
And now it looks like that .NET Framework cumulative
update is still ready to install.
Let's just try installing that manually now and using the install
Windows updates as part of the PS Windows update module.
I can provide the KP article ID, which in this case ends with 802.
Ah,
that looks much better when I had it installed it and the result is installed.
Now,
one final check of the history to confirm it went through awesome success by
troubleshooting the root cause and resetting the environment.
We got this build update to install.
So what do you think the issue was in the beginning?
Well,
actually I broke it on purpose by simply removing
the Windows update registry key,
the reset W components command completely reset that and the
service rebuilt the registry key and it fixed it.
And then finally we could install the update.