Disable automatic updates (2012R2) with powershell
This is the full list of reg keys for Windows Update for reference, but if you set HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\WindowsUpdate\AU\NoAutoUpdate
to 1
this disables Windows Update.
You can use New-ItemProperty to set this value using PowerShell
Noam
Updated on June 07, 2022Comments
-
Noam about 2 years
I saw some related questions but none of the solutions didn't work for me. I have windows server 2012R2 and I need to disable it automatic windows updates with Powershell v5.0 or batch (Powershell is preferred).
I can do it manually, by opening
gpedit.msc
, navigating toComputer Configuration -> Administrative Templates -> Windows Components -> Windows Update
and then changingConfigure Automatic Updates
toDisable
.How can that be done automatically without using external powershell modules (such as
PolicyFileEditor
).Is there an equivalent registry key that changing it can get the job done? I know that there is one for Windows server 2008 but I'm using 2012R2.