Take a read here:
https://www.ajtek.ca/wsus/does-wuauclt-exe-detectnow-reportnow-work/
Then look at the client side script section here:
https://www.ajtek.ca/wsus/client-machines-not-reporting-to-wsus-properly/
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
04/22/2022 - 11:24
Hello,
I am studying in a computer science school, and I work in a telecommunication company (sandwich course). I have a project to do to validate my year.
I have a Windows server 2012 R2.
My goal is to update my computer with command lines.
I have the constraint to use only CMD and not Powershell.
I found the following commands on internet:
wuauclt.exe /detectnow /updatenow
Once I have run them, I unfortunately have no direct return to the CMD window.
Do you know other command lines ?
Don't hesitate to ask me questions, if you don't understand something, or if you need more information.
I will make updates if I find new things.
Thanks in advance for your feedback.
(Sorry, for my bad English)
Take a read here:
https://www.ajtek.ca/wsus/does-wuauclt-exe-detectnow-reportnow-work/
Then look at the client side script section here:
https://www.ajtek.ca/wsus/client-machines-not-reporting-to-wsus-properly/
@Margo hda
We could add the related registry value to push the Server scan for updates from the internet. Here is related link for you:
https://learn.microsoft.com/en-us/windows/deployment/update/waas-wu-settings#configuring-automatic-updates-by-editing-the-registry
Reference command:
reg add HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU /V AUOptions /T REG_DWORD /D 4
Here is a related screenshot for you:
In addition, please refer to the Official Document to know more about reg add command:
https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/reg-add
In additon, I attached my registry file for your reference:
195997-auupates.log
Best regards,
Rita
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
The easiest solution is to use AD group policy and let the servers update themselves.
We used a scheduled task to call a script because we had numerous requirements from both management and our application teams.
There was a whole lot more that we did as part of the "patch weekend" process. We were updating thousands of servers.
With "only" 200 servers you should be able to do that with a spreadsheet and a couple of Powershell scripts.
There are lots of examples on the internet. Find something that fits your organization's requirements and try it out on few test servers first to see how it works.
https://www.bing.com/search?q=powershell+install+updates+script
https://petri.com/how-to-manage-windows-update-using-powershell/
Why can't you use Powershell?
Windows Update The wuauclt.exe /detectnow command has been removed and is no longer supported. To trigger a scan for updates, run these PowerShell commands:
$AutoUpdates = New-Object -ComObject "Microsoft.Update.AutoUpdate"
$AutoUpdates.DetectNow()
While it doesn't apply to your 2012 R2 server's use of wuauclt, MS's direction for server administration is (has been for years) Powershell.
Years ago I wrote a VB script (pre Powershell days) that used that com interface to install the updates on the servers for my company. I didn't have much luck with wuauclt. I found it rather frustrating that "wuauclt /? or /help or sdfflhgdb" produced no output. Poor design if you ask me. There should be console output to report what it did.
I have found posts that indicate that usoclient.exe can do installs. You could try that if it's on 2012R2.
If it were me, I would be advocating for Powershell.