Share via

Command Update-AzVM

bombbe 1,486 Reputation points
2021-03-08T12:29:38.327+00:00

Hi,
could not find really any information about command Update-AzVM. Can someone explain what is that command used for and where or why should it be used? SYNOPSIS: "Updates the state of an Azure virtual machine." but that do not say anything to me.

https://learn.microsoft.com/fi-fi/powershell/module/az.compute/update-azvm?view=azps-5.6.0

Azure Virtual Machines
Azure Virtual Machines

An Azure service that is used to provision Windows and Linux virtual machines.

Windows for business | Windows Server | User experience | PowerShell
0 comments No comments

Answer accepted by question author

Andreas Baumgarten 132.1K Reputation points MVP Volunteer Moderator
2021-03-09T19:38:41.263+00:00

Based on my search in the internet it looks like there are some modifications/changes that require an Update-AzVM. I haven't verified that by myself if an Update-AzVM is really required in this cases.

Changing the encryption of a VM's disk:
https://www.c-sharpcorner.com/blogs/azure-vm-failed-to-update-virtual-machine-disks-solved

Disable the BootDiagnostic status of a VM:
https://yungchou.wordpress.com/2020/05/28/disabling-enabling-azure-vm-bootdiagnostic-using-powershell/

I can't figure out what happens exactly behind the scenes if the cmdlet Update-AzVM is used.


(If the reply was helpful please don't forget to upvote and/or accept as answer, thank you)

Regards
Andreas Baumgarten

Was this answer helpful?

0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Andreas Baumgarten 132.1K Reputation points MVP Volunteer Moderator
    2021-03-08T12:51:10.673+00:00

    Hi @bombbe ,

    the Update-AzVM cmlet could be used to update an existing VM after modifications of the VM config.
    An example is here:
    https://learn.microsoft.com/en-us/azure/virtual-machines/windows/tutorial-manage-vm#resize-a-vm

    ----------

    (If the reply was helpful please don't forget to upvote and/or accept as answer, thank you)

    Regards
    Andreas Baumgarten

    Was this answer helpful?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.