Start Azure V2 VMs

This Graphical PowerShell runbook connects to Azure using an Automation Run As account and starts all V2 VMs in an Azure subscription or in a resource group or a single named V2 VM. You can attach a recurring schedule to this runbook to run it at a specific time. The asso

4.5 Star
157,214 times
Add to favorites
Windows Azure
E-mail Twitter Digg Facebook
  • Cannot run start runbook
    1 Posts | Last post November 07, 2019
    • I need some help.  I cannot create a run book due to the following error listed below, everything appears to run fine before it but then it fails.  Can somebody point me in the right direction?
      RunbookFlow : 'this.Client.SubscriptionId' cannot be null.
      At line:9 char:57
      + <#-- Enable activity tracing to see error location --#> RunbookFlow `
      +                                                         ~~~~~~~~~~~~~
          + CategoryInfo          : CloseError: (:) [Invoke-RunbookFlow], ValidationException
          + FullyQualifiedErrorId : Orchestrator.GraphRunbook.Cmdlets.InvokeRunbookFlowCommand
      Thank you
  • Outputs an error
    2 Posts | Last post October 29, 2019
    • When I start the runbook it outputs an error: "[VMNAME] failed to start. Error:".
      The error-field is blank, but it still starts the VM. 
      Am I missing something?
    • I'm having exactly the same problem.
  • How can I use a login authentication other than Run As account?
    2 Posts | Last post June 19, 2019
    • Hi,
      In my subscription, I don't have the permission to create a Run As account. Are there other ways to authenticate aside from Run As account?
      Thank you.
    • No there is not another way tot authenticate 
  • Unable to start vms in one shot.
    1 Posts | Last post May 16, 2019
    • I am unable to start bulk vms also can you attach the sample output.
  • Resourcegroupname isn't optional
    1 Posts | Last post July 25, 2018
    • I think resourcegroupname is mandatory for a single VM to start. It now states that this is optional
  • VM Failed to start
    4 Posts | Last post July 11, 2018
    • Hi,
         the script runs correctly and the virtual machine starts. However, when I see the job log, the output is "VM failed to start". Do you kwnow why?
      Thanks in advance
    • I had this problem too. What I did was change the condition expressions for Notify VM Started and Notify Failed To Start to the following respectively. The issue was that the original condition .Status "Succeeded" is not part of the output from Start VM so it will always fail.
      $ActivityOutput['Start VM'].IsSuccessStatusCode -eq $true
      $ActivityOutput['Start VM'].IsSuccessStatusCode -ne $true
    • Hi, I've been using this great script for a while to start 3 VM. As they are the only vm in the only resource group, I dont need to specify any imput parameters. Sadly since november, the vm wont start or only two of them will start with a delay. As an example, I use only one schedule at 8am, it uses to start the 3 vm before 8:10. Now, the first machine starts at 9, the otherone at 10:30 an the lastone wont start at all. 
      the only logs that I get is: 
      RunbookFlow : Long running operation failed with status 'Failed'.
      StartTime: 2/16/2018 9:00:30 AM
      EndTime: 2/16/2018 11:55:13 AM
      OperationID: 813313db-431f-4c26-b8b2-4d5edae5d142
      Status: Failed
      ErrorCode: InternalOperationError
      ErrorMessage: Operation abandoned due to internal error. Please try again later.
      At line:9 char:57
      + <#-- Enable activity tracing to see error location --#> RunbookFlow `
      +                                                         ~~~~~~~~~~~~~
          + CategoryInfo          : CloseError: (:) [Invoke-RunbookFlow], ComputeCloudException
          + FullyQualifiedErrorId : Orchestrator.GraphRunbook.Cmdlets.InvokeRunbookFlowCommand
      I've tried out common things like redeploying the runbook, using multiple schedule for each machine, etc, etc. 
      Any thoughts of whats going on?
      I've also recreated the automation account. 
    • It seems that there is an open Issue with the powershell command Start-AzureRmVM (
      The comand stays running for a long time, although the VM is correctly started. When the job exceeds 3 hours, Azure kills the Job. As a result, I´ve had to change my automation account type to paid, so my jobs keeps running after 500 monthly free automation minutes. Maybe if everyone keeps commenting on the github link and put some pressure this problem gets addressed.
  • Only Starts One VM
    1 Posts | Last post March 02, 2018
    • Hi,
      I have shutdown 4 VMs and when I run this script it will start the first one then it will just sit there and never finish. I run it again and it starts the next one. Any ideas why it won't start all the VMs?
  • $ActivityOutput['Get VM'].Statuses
    2 Posts | Last post February 02, 2018
    • Where does this collection get set? This did not return anything when I tried reproducing this automated script.
    • Murphy's law.  Now that I ask, it's working! Never mind me. Just a newbie!
  • VM Failed to Start
    1 Posts | Last post November 09, 2017
    • We've been using this script for over a year now with great results. Over the past few months, however, I've been receiving the following error message: 
      ABC-Server failed to start. Error was:
          + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
          + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException
      Looks like the same error Etorrescobos describes in his question. The VM starts and stops just fine, it just logs this error. Any idea why? 
  • Parallel start
    4 Posts | Last post Thu 10:42 AM
    • It seems it starts each VM sequentially, taking some time to finish and wasting Job Time. Could you change to Start all VMs at once?
    • Did you find a way to start them all at once?
    • it would be great if the action can happen in parallel
    • You have to create more schedeules for the same Runbook. If you create two schedeules in wihch you write different imput data (each VM name) you can run the same Runbook at the same time
1 - 10 of 11 Items