Welcome to Microsoft Q&A Forum, thank you for posting your query here!
We understood that you are seeking a particular Azure CLI commands to create and manage the schedule updates in Azure update manager.
kindly refer to the below MS document, it covers the Azure CLI options for using this feature.
https://learn.microsoft.com/en-us/azure/virtual-machines/maintenance-configurations-cli
Below are the steps to create and manage the schedule updates in Azure update manager.
- Create the maintenance configuration
- Assign the configuration
- Check the configuration
- Post the configuration set up, we can check the pending updates
- We could Apply updates if we had any pending updates
- Check the status of applying updates
- If we want to Delete the maintenance configuration, we can use the appropriate CLI command.
Provided the commands for all the above-mentioned steps in the below article, please use it accordingly.
https://learn.microsoft.com/en-us/azure/virtual-machines/maintenance-configurations-cli
Example commands to create the maintenance configuration.
So, use az maintenance configuration create
command to create a maintenance configuration. Here as an instance the scope has selected as host machines, with a scheduled window of 5 hours on the fourth Monday of every month:
Note: Please replace your values in the below command
*az maintenance configuration create
--resource-group myMaintenanceRG \
--resource-name myConfig \
--maintenance-scope host \
--location eastus \
--maintenance-window-duration "05:00" \
--maintenance-window-recur-every "Month Fourth Monday" \
--maintenance-window-start-date-time "2020-12-30 08:00" \
--maintenance-window-time-zone "Pacific Standard Time"
Post maintenance configuration creation, follow the above-mentioned steps with the appropriate CLI commands.
Please let us know if you have any further queries. I’m happy to assist you.
If the above Answer is helpful, please click "Upvote it"