4

In Windows 10 Home, the options for Windows Update are limited. I would like to stop it from starting up and instead have the user launch it when they are ready. The reason is that it starts too frequently, taking too long and it eats up the battery and the user is not happy.

I can disable the Window Update service and setup a reminder for the user to launch a script to re-enable it and start it up. But how do I tell when Windows Update has completed so I can re-disable the service again?

This question does not help...

how-to-detect-quickly-that-windows-update-is-running-right-now-on-my-pc

2
  • But how do I tell when Windows Update has completed so I can re-disable the service again? - Updates to Windows are release on Tuesdays, a good time to restart, is after they have been released. So you install the updates, reboot, and do all maintenance items at once.
    – Ramhound
    Apr 25, 2016 at 16:27
  • @Ramhound Ok. If the updates require a restart I can setup a startup item to re-disable the service. But what if the updates do not require a reboot? How do I know when they finished installing? Apr 25, 2016 at 23:19

3 Answers 3

2

Perhaps, you can schedule a PowerShell script with Task Scheduler to check every Wednesday the Windows Update Client History.

I put a quick script that checks whether all updates applied within the last day have succeeded.

$Session = New-Object -ComObject "Microsoft.Update.Session"

$Searcher = $Session.CreateUpdateSearcher()
$yesterday = (Get-Date).Addmonths(-5)

$historyCount = $Searcher.GetTotalHistoryCount()



$Searcher = $Searcher.QueryHistory(0, $historyCount) | Where-object {$_.Date -gt $yesterday} |Select-Object Title, Date,

    @{name="Result"; expression={switch($_.ResultCode){

       0{"NotStarted"}; 1 {"InProgress"}; 2 {"Succeeded"}; 3 {"SucceededWithErrors"}; 4 {"Failed"}; 5{"Aborted"}

}}} 


if ($Searcher -eq $null){

Write-Host "Updates not found."
break

}

#Checks for whether all updates installed correctly.
if ($Searcher.Result -eq "Succeeded"){

Write-Host "Everything installed."

#Stops windows service
Stop-Service -Name wuauserv -Force
Get-service  -Name wuauserv 


}
elseif ($Searcher.Result -eq "InProgress"){

Write-Host "Updates are still been applied."
}
else {


Write-Host "Updates are in error status"
$Searcher 
}

NOTE:

Credit goes to Kurt Hudson and Peter Gleelen at the Microsoft TechNet Forum for posting How to List All of the Windows and Software Updates Applied to a Computer.

1

I suggest you to use the tool called Windows Update MiniTool which allows to search for updates and also select which updates you would like to be installed and allows to block updates like you could in former Windows versions.

enter image description here

An alternative to the standard Windows Update What you can do:
Check for updates
• Download updates
• Installing Updates
• Deleting installed updates
• Hiding unwanted updates
• Get direct links to the *.cab / *.Exe / *.Psf update files • View update history
• Configure Automatic Updates
• This tool is like the external powershell module PSWindowsUpdate, but much more advanced and user-friendly features
• The tool relies and use same WU infrastructure, all downloading are through WU it's not a downloader

2
  • This is not open source, and considering how critical WU is to the security of the OS, no thank you. Apr 25, 2016 at 23:17
  • this tool only calls WU API, I see no issue using it.This is the only tool I currently know that provides a deeper WU control on Windows 10. Use it or accept the default Windows 10 update mechanism. Apr 26, 2016 at 4:17
1

If you use the module PSWindowsUpdate from PS Gallery you can just check for available updates after each patch run until there are no more...

Install-Module PSWindowsUpdate
while (Get-WUList) {
  Install-WindowsUpdate -AcceptAll -AutoReboot
}

Now, you of course, need to start this after each reboot until there are no more patches.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .