Stop-AzVM
will do/try a graceful shutdown if you don't use the -SkipShutdown
parameter:
https://learn.microsoft.com/en-us/powershell/module/az.compute/stop-azvm?view=azps-8.2.0 -> See description of the -SkipShutdown` parameter here: https://learn.microsoft.com/en-us/powershell/module/az.compute/stop-azvm?view=azps-8.2.0#parameters
A few days ago I ran in the error C0000034
issue on VM as well because the update was still running during shutdown or start phase of the VM and a Stop-AzVM was triggered.
But I was able to fix the error C0000034
issue and decided to do the Windows Updates manually in the future ;-)
----------
(If the reply was helpful please don't forget to upvote and/or accept as answer, thank you)
Regards
Andreas Baumgarten