Unfortunately these values are not able to be changed once the VM is created. If you require changing these values you will need to recreate the VM. Details about this can be on the Automatic VM guest patching for Azure VMs page:
For Windows VMs, the property osProfile.windowsConfiguration.enableAutomaticUpdates
can only be set when the VM is first created. This impacts certain patch mode transitions. Switching between AutomaticByPlatform and Manual modes is supported on VMs that have osProfile.windowsConfiguration.enableAutomaticUpdates=false
. Similarly switching between AutomaticByPlatform and AutomaticByOS modes is supported on VMs that have osProfile.windowsConfiguration.enableAutomaticUpdates=true
. Switching between AutomaticByOS and Manual modes is not supported.
Sorry for the bad news. Let me know if you need more assistance or have more questions.
If you still have questions, please let us know in the "comments" and we would be happy to help you. Comment is the fastest way of notifying the experts. If the answer has been helpful, we appreciate hearing from you and would love to help others who may have the same question. Accepting answers helps increase visibility of this question for other members of the Microsoft Q&A community. Thank you for helping to improve Microsoft Q&A!