Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change windows updates setting with Powershell

Im working with Windows Server 2008 r2, and trying to configure a PowerShell script to change the settings of windows updates to download but let me choose to install.

like image 268
user1604046 Avatar asked Apr 13 '26 03:04

user1604046


2 Answers

You can do it right from the registry with this command:

Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU\AUoptions" -Name newproperty  -Value "4"
like image 112
Nick Avatar answered Apr 15 '26 21:04

Nick


Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Name AUOptions -Value 3

2 = Notify before download.

3 = Automatically download and notify of installation.

4 = Automatic download and scheduled installation. (Only valid if values exist for ScheduledInstallDay and ScheduledInstallTime.)

5 = Automatic Updates is required, but end users can configure it.

https://learn.microsoft.com/de-de/security-updates/windowsupdateservices/18127499

like image 43
Yoseph Avatar answered Apr 15 '26 21:04

Yoseph



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!