Comments on: How To Run Windows Update From Command Line (CMD & PowerShell) https://www.itechtics.com/run-windows-update-cmd/ Making Technology Accessible Fri, 13 Oct 2023 13:07:40 +0000 hourly 1 https://wordpress.org/?v=6.4.1 By: Brett https://www.itechtics.com/run-windows-update-cmd/#comment-408357 Thu, 15 Jun 2023 15:22:32 +0000 https://www.itechtics.com/?p=31130#comment-408357 Nice article. If you want to do the same in an OOBE environment, (pre-logged in/just installed the OS, etc), we use this method all the time (at my job) to update the OS without having to log in to a user account.

1. Press SHIFT+FN+F10 or SHIFT+F10, which usually brings up a CMD prompt, then type and press enter:

start ms-settings:windowsupdate

You can also press WINKEY+E to launch Explorer to access the file system during this part of the set up.

]]>
By: Justin https://www.itechtics.com/run-windows-update-cmd/#comment-374152 Tue, 20 Dec 2022 20:30:11 +0000 https://www.itechtics.com/?p=31130#comment-374152 In reply to Andi.

“wuauclt is no longer available with Windows 10”

That’s not true at all. I use it all the time to have machines check in.

$updateSession = new-object -com “Microsoft.Update.Session”; $updates = $updateSession.CreateupdateSearcher().Search($criteria).Updates

wuauclt /reportnow

Works 100% of the time. Windows 10 22H2 and Server 2022.

UsoClient on the other hand, no longer works. MS did something to restrict access.

]]>
By: rich https://www.itechtics.com/run-windows-update-cmd/#comment-204992 Tue, 03 Nov 2020 00:28:22 +0000 https://www.itechtics.com/?p=31130#comment-204992 Thank you Usman! Wow Microsoft has a new cli USOClient.exe awesome!

]]>
By: T. Joy Lee https://www.itechtics.com/run-windows-update-cmd/#comment-160839 Sun, 24 May 2020 01:25:00 +0000 https://www.itechtics.com/?p=31130#comment-160839 Thank you. Refurbished machine – needed to update in order to move from other machine to “new to me” machine after just getting ti to cooperate with the network. I have never run across a machine that would not update before. The cmd options did not work, but the PS option was exactly what I needed. Added to my bag of tricks. Thank you so much!!

]]>
By: Stig https://www.itechtics.com/run-windows-update-cmd/#comment-145850 Mon, 09 Mar 2020 10:55:35 +0000 https://www.itechtics.com/?p=31130#comment-145850 usoclient.exe /StartScan does not update the shown ‘Last checked date’ shown in the GUI on a Windows Server 2016 or 2019.

]]>
By: Usman Khurshid https://www.itechtics.com/run-windows-update-cmd/#comment-145846 Mon, 09 Mar 2020 10:16:41 +0000 https://www.itechtics.com/?p=31130#comment-145846 In reply to Stefan.

Please run PowerShell with administrative privileges.

]]>
By: Stefan https://www.itechtics.com/run-windows-update-cmd/#comment-145814 Sun, 08 Mar 2020 20:59:36 +0000 https://www.itechtics.com/?p=31130#comment-145814 In reply to Stig.

I don’t get any of these from article to work. Not even: Start-Service wuauserv -Verbose

PS C:\WINDOWS\system32> Start-Service wuauserv -Verbose
VERBOSE: Performing the operation “Start-Service” on target “wuauserv (wuauserv)”.
Start-Service : Failed to start service ‘wuauserv (wuauserv)’.
At line:1 char:1
+ Start-Service wuauserv -Verbose
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OpenError: (System.ServiceProcess.ServiceController:ServiceController) [Start-Service],
ServiceCommandException
+ FullyQualifiedErrorId : StartServiceFailed,Microsoft.PowerShell.Commands.StartServiceCommand

Halp?

]]>
By: Stig https://www.itechtics.com/run-windows-update-cmd/#comment-143070 Mon, 24 Feb 2020 09:12:45 +0000 https://www.itechtics.com/?p=31130#comment-143070 PS C:\> Start-Service wuauserv -Verbose
PS C:\> $updateSession = new-object -com “Microsoft.Update.Session”;$updates=$updateSession.CreateupdateSearcher().Search($criteria).Updates
PS C:\> (New-Object -ComObject Microsoft.Update.AutoUpdate).DetectNow()

This is work on a Windows 10 – the Last checked time is updated in the GUI
BUT it’s not workting om Windows 2016 or 2019

Any know of a way to make this work on a Server 2016 ??

]]>
By: Usman Khurshid https://www.itechtics.com/run-windows-update-cmd/#comment-142821 Thu, 20 Feb 2020 20:58:38 +0000 https://www.itechtics.com/?p=31130#comment-142821 In reply to Glenn.

Hi Glenn, thank you for such a detailed explanation.

]]>
By: Glenn https://www.itechtics.com/run-windows-update-cmd/#comment-142814 Thu, 20 Feb 2020 19:41:09 +0000 https://www.itechtics.com/?p=31130#comment-142814 In reply to StigN.

Function Force-WSUSCheckin($Computer)
{
Invoke-Command -computername $Computer -scriptblock { Start-Service wuauserv -Verbose }
# Have to use psexec with the -s parameter as otherwise we receive an “Access denied” message loading the comobject
$Cmd = ‘$updateSession = new-object -com “Microsoft.Update.Session”;$updates=$updateSession.CreateupdateSearcher().Search($criteria).Updates’
& c:\bin\psexec.exe -s \\$Computer powershell.exe -command $Cmd
Write-host “Waiting 10 seconds for SyncUpdates webservice to complete to add to the wuauserv queue so that it can be reported on”
Start-sleep -seconds 10
Invoke-Command -computername $Computer -scriptblock
{
# Now that the system is told it CAN report in, run every permutation of commands to actually trigger the report in operation
wuauclt /detectnow
(New-Object -ComObject Microsoft.Update.AutoUpdate).DetectNow()
wuauclt /reportnow
c:\windows\system32\UsoClient.exe startscan
}
}

]]>