Change windows updates setting with Powershell

强颜欢笑 提交于 2019-12-21 22:05:08

问题


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.


回答1:


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"



回答2:


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://docs.microsoft.com/de-de/security-updates/windowsupdateservices/18127499



来源:https://stackoverflow.com/questions/11993125/change-windows-updates-setting-with-powershell

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!