This article provides an overview of the patch management module in Atera and a short guide on troubleshooting the most common Windows Update errors including some of the known issues using Atera's patching:
Microsoft WUA API
Atera is fully aligned with Microsoft WUA ("Windows Update Agent”) and we fetch the available patches list using the WUA API. More details here
Therefore, results in Atera should not be matched with results from Windows Update History.
Below are the commands provided by Microsoft to run and use with their WUA API. Based on these commands, Atera fetches the available and installed list of patches that you see in the console:
PS script for installed patches:
$Session = New-Object -ComObject Microsoft.Update.Session
$Searcher = $Session.CreateUpdateSearcher()
$Searcher.Search("IsInstalled=1").Updates | ft -a title
PS script for available patches:
$Session = New-Object -ComObject Microsoft.Update.Session
$Searcher = $Session.CreateUpdateSearcher()
$Searcher.Search("IsInstalled=0").Updates | ft -a title
In case the results do not match after a refresh, you can delete some cache files from the agent's data folder and restart the AteraAgent:
del "C:\Program Files\Atera Networks\AteraAgent\Packages\AgentPackageOsUpdates\ptc3.cch"
net stop "AteraAgent" && net start "AteraAgent"
Maximum Download Size
The Windows Update Agent API uses two values for a patch size: MinDownloadSize and MaxDownloadSize. The Agent calculates the maximum potential installation size. For a cumulative patch, the maximum potential size will take into account the data for all possible OS builds compatible with the respective patch. But on a single device, the full size should only be a few GBs.
This is based on the following PS query:
$Session = New-Object -ComObject Microsoft.Update.Session
$Searcher = $Session.CreateUpdateSearcher()
$Searcher.Search("IsInstalled=0").Updates | ft -a title, maxdownloadsize
Note: The MinDownloadSize property of an update is always downloaded. However, the MaxDownloadSize property is not always downloaded.
The MaxDownloadSize property is downloaded based on the configuration of the computer that receives the update.
In case you cannot install an update because your device is running low on free space, you could find a fix by following this Microsoft troubleshooting guide.
Patch Release Date
You can find a patch's release date in Atera by accessing the Device page > Manage > Patch Management > filter Installed Patches - Yes.
This date is the LastDeploymentChangeTime which gets the last published date of the update, in Coordinated Universal Time (UTC) date and time, on the server that deploys the update.
It is based on the following script:
$Session = New-Object -ComObject Microsoft.Update.Session
$Searcher = $Session.CreateUpdateSearcher()
$Searcher.Search("IsInstalled=1").Updates | ft -a title, lastdeploymentchangetime
Troubleshoot general Windows Update errors:
Patching a machine either through Atera or using the Local Windows Update service can often return various errors.
The first troubleshooting step is finding out more details on the respective errors. For that, you can check the following logs depending on how the patching was executed:
- Atera patching: a log.txt is saved by default under the following path: C:\Program Files\Atera Networks\AteraAgent\Packages\AgentPackageOsUpdates
- Local Windows patching: you can read the logs using the PowerShell command Get-WindowsUpdateLog (applicable to Windows 10)
Once you locate the error, you can refer to this Microsoft guide for Windows Update common errors and mitigation or run a quick search online for suggested fixes.
A full reset of the Windows Update services/files/folders can also come in handy. We have found two scripts posted by Microsoft Script Center's users. You can check the scripts here.
NOTE: Although the scripts have been tested in different OS environments, it is recommended to first test these on a lab machine before deployment.
For a list of the most common errors returned by the Patch & Automation Feedback report, please refer to this article.
You can also use this guide from Microsoft to troubleshoot problems updating Windows 10 (for Windows 8.1 and 7, click here).