Created
May 3, 2016 04:18
-
-
Save irwinwilliams/ca428b195105d8a519e2b75e76374873 to your computer and use it in GitHub Desktop.
Start/Stop a classic Azure VM using the azure cli (needs jq installed)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
azure login -u <username> | |
azure config mode asm | |
export vm_name=<vmname> | |
export vm_state="$1" | |
azure vm $vm_state $vm_name | |
azure vm show $vm_name --json | jq -s .[].InstanceStatus | |
azure config mode arm |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment