The Windows Update log is a powerful tool in determining issues with Windows Update. Whether it's simple a patch failing to install or issues connecting to Microsoft Update. This log can provide valuable detail in most cases.
Accessing the Log File
Before Windows 10 and Server 2016 this was as simple as looking at this file
In Windows 10 and Server 2016 you need to run a recently introduced PowerShell cmdlet to generate this log file.
When you run this command, a log file will be generated and placed on your desktop. If you would like the file to be stored elsewhere, you can specify the path
Get-WindowsUpdateLog -LogPath C:\Path\To\MyLog\WindowsUpdate.log
Reading the Log File
Once you have your log file and are ready to dig in start by looking around the time your patch failed. Each line has a timestamp (Local system timezone) that can be used for reference. Additionaly, or optionally, you can search for the particular patch KB number that you're having issues with.
Now that we have an idea of where to look, we're usually looking for an error code of some sort to point us in the right direction.
These error codes almost always look like these below. Starting with "8024" and accompanied by "*FAILED*" or "Exit Code".
Once you've found your Error Code, check it against our reference page linked below or check out Microsoft's Documentation for the specific code you're seeing.