Disable Auto Updates on VMs created from custom images

Maxim Zaytsev 6 Reputation points

How can I disable auto updates on VMs created from custom images

I've tried to configure image with

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

But after deployment is complete, NoAutoUpdate key is set to 0

What is the right approach here?

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
7,385 questions
Azure DevTest Labs
Azure DevTest Labs
An Azure service that is used for provisioning development and test environments.
261 questions
{count} vote

2 answers

Sort by: Most helpful
  1. jakaruna-MSFT 596 Reputation points Microsoft Employee

    Can you set that VM's "enableAutomaticUpdates" to false as shown below and try again.

    "osProfile.windowsConfiguration.enableAutomaticUpdates" Set this property to false Then rebbot and check for the registry key.

    By default that value is set to true.

    You can change that value through powershell or rest api.
    In powershell just get the vm though get-azvm and change that value and set with set-azvm.

    Try this out and let me know

    0 comments No comments

  2. Cosme Junior 21 Reputation points



    Automatic modes to Manual mode is currently not supported

    Switching from AutomaticByOS mode to AutomaticByPlatfom mode is supported.

    I think we can't disable for already created machines, must be or manage by OS or by Platform.......

    I did what you said, after the restart of the VM, the value kept as 1, however I am not sure if the next time the windows update runs, it will not start up automatically, since the other properties remain the same


    do you know how I can check this parameters for the existing VM I have, is this on the registry ?


    0 comments No comments