az vm reimage
Reimage (upgrade the operating system) a virtual machine. Azure CLI reference
5 options Its page in the Azure CLI reference
Options
--admin-passwordSpecifies the password of the administrator account.--custom-dataSpecifies a base-64 encoded string of custom data.--exact-versionSpecifies in decimal number, the version the OS disk should be reimaged to.--temp-diskSpecifies whether to reimage temp disk.--vm-name, --name, -nThe name of the Virtual Machine.