Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
7,977 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi Support,
I want to create one power shell script for azure vm management with runbook.
Run Get-Azurermvm -Status and if azure VM state stoped then trun on and after sometime run trun off command and trun on vm should be trun off.
Hi,
Try this both links together to build the script as per your requirement.
https://sqlstudies.com/2017/09/12/turn-onoff-azure-vms-with-powershell/
https://gallery.technet.microsoft.com/scriptcenter/Stop-Start-AzureVM-535c2414#content