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 to Computer Configuration -> Administrative Templates -> Windows Components -> Windows Update
and then changing Configure Automatic Updates
to Disable
.
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.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With