Thomas, thank you SO much for this tutorial! I have been looking uip and down for a simple way to stop and restart Azure VM's on a schedule, and this was it! Much respect to you, from a former Microsoft employee!
Many thanks for posting this Thomas. This was just what I was looking for, I had some test VMs that I didn't enable the auto shutdown feature during their creation because I needed them to start running for others to use before i started work, so I just left them on which obviously got expensive very quickly. This will save me a lot of money and effort - cheers!
Thanks indeed Thomas, quite amusing and instructive your video, I really, really liked it! I am going to use it and come back to let you know how it worked for me. Regards!
Currently doing this using Powershell scripts that are run via schedule in automation accounts with SPN accounts for the run-as. Will give this method a try. Thank you!
Hey Thomas very nice. Need one help. I need to start/stop vm only on weekdays.how can I do it I mean from Monday to Friday every week. How can I adjust the time interval and frequency?
How could I use it to shutdown every weekdays, but on friday turn off and only turn on on monday, to keep turned it off on weekend? I didn't see any option to select the days I want to execute.
This will not deallocate the VM, just shut it down. Hence the cost will still be running. To deallocate, use the the same method to make the task, but edit the task in the Logic Apps. Add step after shutdown by clicking on the "+" sign --> Choose add action --> in searchbox write: deallocate. Under result for "Action" you will find "Deallocate virtual machine". Choose this and configure with the correct values with the drop down list. Beside this, its a great video Thomas.
Thanks for the video. Much easier than how I was trying to run this task. Question - I am in Denver, selected Mountain Standard Time, but it seems to be off by an hour. I adjusted the time by an hour, but the tasks still ran an hour later than scheduled. IE - Task /VM off at 11pm VM on at 6am - Task ran at 12am and 7am. Tried different time zone with same results. Thx,
Very nice. This would seem obvious to some, but just a friendly reminder to NEVER use a user's account to keep automation tasks running. Users come and go, but the business continues :p always make a generic or service account
This is a great video What if i want the VM's to be turned on only on week days (Mon-Fri) and not on weekends (Sat-Sun). The same should repeat every week. How can this be done?
Thanks, it will be charged with stopped status so how to deallocate VM? If the status says “Stopped (Deallocated),” you're not being billed. If it says, “Stopped Allocated,” you're still being billed for allocated virtual cores (not the software license itself).
We need to use Auto shutdown option to shutdown VM with deallocation status and need to use add task option to start VM from Stopped deallocated status to running. it worked with me.
Hi there, great video. The company I work for manages over 300 Azure VMs, we need to auto shut them down and start them at specific schedules for different countries, we also need to re-establish any applications that are not running after starting them. We are exploring ways to do this. How can I automate this process? Thanks a lot.
This video has been super helpful, but it leaves me with a question. Azure not only creates a logic app but also two resources called 'API Connections' in the resource group. Can you elaborate on what those are used for?
Thank you for that, a really simple and strait forward video. I'm still struggling to add a webhook to the logic app that so users can start stop the machine using a weblink.
Excellent video!! But I have a question.... after run, the status became "STOPPED" instead of "Stopped (deallocated) " .... Does "STOPPED" stop charges? or only "Stopped (deallocated) " would stop charges?
I get "No task templates found in this region, please try a using a resource located in a different ergion where logic app is available" when I click on add a task. I've already deployed logic apps too
Is there a way to sign in to the VM once it's started? I'm able to turn it on, but I have tasks (specifically, a Power BI data refresh using a Personal Gateway) that only run when I'm logged in. Can I do this somehow in Logic App Designer? Thanks for this video...very helpful to get me started.
thank you. Yes, I will do one in the coming weeks. Will take a moment, since I have a couple of others in the pipeline. But I have added your idea to the list! Thank you :)
I have a doubt here.. how do I prevent the pubic IP’s of the VMs from changing whenever there is a start after a shutdown as changing IP address will create a block in the flow
It doesnt send me a notification email. It does the task but no email. "message": "REST API is not yet supported for this mailbox. This error can occur for sandbox (test) accounts or for accounts that are on a dedicated (on-premise) mail server.", what does this mean? im not an IT person
Thanks for the video. I trigger the logic apps and get the error message { "code": "InvalidAuthenticationTokenTenant", "message": "The access token is from the wrong issuer }
Associate an identity to the logic app then update the logic app designer credentials to use the new identity. Fixed it this way but now I'm getting insufficient permissions error
i want to schedule to power on from monday to saturday at 9am and it get shutdown at 9Pm and it should be in power off state only on monday and again it should start on monday at 9am?can we schedule like that?
As much as I think this is nice. I dont understand why Microsoft makes such a big issue about this. Isnt it just Schedule -> Powershell start Azure-VM. Easy done. Why do I need to talk to einstein, every time something very simple has to be done? :D
Thomas, thank you SO much for this tutorial! I have been looking uip and down for a simple way to stop and restart Azure VM's on a schedule, and this was it!
Much respect to you, from a former Microsoft employee!
thank you!
Of all the documents and videos, your video explains the topic the best. Great Work. Keep it up!
Many thanks for posting this Thomas. This was just what I was looking for, I had some test VMs that I didn't enable the auto shutdown feature during their creation because I needed them to start running for others to use before i started work, so I just left them on which obviously got expensive very quickly. This will save me a lot of money and effort - cheers!
you're welcome! :)
Incredible video-profoundly insightful! Much gratitude for sharing such valuable content!
Glad it was helpful!
What would it look like to schedule the autostart for M-F of every week?
Thank you very much for the explanation, very detailed and "straight to the point"
you're welcome!
Good one - just applied & waiting to see
And it works just like a champ ! Could you post something on the Azure Automation Account same way which can target multiple VMs in single shot ?
Thanks indeed Thomas, quite amusing and instructive your video, I really, really liked it! I am going to use it and come back to let you know how it worked for me. Regards!
Great to hear!
Wow, genius -- I will test this for my E2E-Test VM's -- thank you for this great tipp 🤙
Man this was so much easier than scripting in the automation account.
yes it is :)
@@Thomas_Maurer any pros & cons on using tasks vs. scripting the automation accounts?
yes, 3years back i created a automation account then run the shutdown and start script through runbook
Currently doing this using Powershell scripts that are run via schedule in automation accounts with SPN accounts for the run-as. Will give this method a try. Thank you!
nice, let me know how it is going :)
Thank you very much. Very well explained, clear and helpful.
Hey Thomas, thanks indeeeeeeddddd!!!! It worked out quite fine!!!!!!!!!!!! Thanks indeed!
Glad it helped!
Hey Thomas very nice. Need one help. I need to start/stop vm only on weekdays.how can I do it I mean from Monday to Friday every week. How can I adjust the time interval and frequency?
Got the same question - can you tell me how you did it?
Have the same question as well.
FANTATSTICOOOOOOO... LOVELY VIDEO
How could I use it to shutdown every weekdays, but on friday turn off and only turn on on monday, to keep turned it off on weekend? I didn't see any option to select the days I want to execute.
This will not deallocate the VM, just shut it down. Hence the cost will still be running. To deallocate, use the the same method to make the task, but edit the task in the Logic Apps. Add step after shutdown by clicking on the "+" sign --> Choose add action --> in searchbox write: deallocate. Under result for "Action" you will find "Deallocate virtual machine". Choose this and configure with the correct values with the drop down list. Beside this, its a great video Thomas.
so how we can stop money meter or you can say deallocate the VM
@@kuldeep7063 Hi, I have written the answer in my post. Did you try it?
Thanks a lot for this video. This is the easiest way to do it!
Nice one Thomas, thanks for the tip.
Thanks
thank you very much ..that was so simple and on-point info shared !!
Thanks for the video. Much easier than how I was trying to run this task. Question - I am in Denver, selected Mountain Standard Time, but it seems to be off by an hour. I adjusted the time by an hour, but the tasks still ran an hour later than scheduled. IE - Task /VM off at 11pm VM on at 6am - Task ran at 12am and 7am. Tried different time zone with same results. Thx,
Very nice. This would seem obvious to some, but just a friendly reminder to NEVER use a user's account to keep automation tasks running. Users come and go, but the business continues :p always make a generic or service account
this is very simple than using run books if we do not have any sequential start.
Thanks man.. This is easy and Fun......!!!
Great to hear, thank you
This is a great video
What if i want the VM's to be turned on only on week days (Mon-Fri) and not on weekends (Sat-Sun). The same should repeat every week.
How can this be done?
possible to script by creating automation account
Thanks, it will be charged with stopped status so how to deallocate VM?
If the status says “Stopped (Deallocated),” you're not being billed. If it says, “Stopped Allocated,” you're still being billed for allocated virtual cores (not the software license itself).
Great Video, thank you, it was very helpful
We need to use Auto shutdown option to shutdown VM with deallocation status and need to use add task option to start VM from Stopped deallocated status to running. it worked with me.
Thanks for the video. How much does it cost per VM to set auto start and auto shutdown per month? How to calculate?
Great content 👍
Thank you 🙌
Hi there, great video. The company I work for manages over 300 Azure VMs, we need to auto shut them down and start them at specific schedules for different countries, we also need to re-establish any applications that are not running after starting them. We are exploring ways to do this. How can I automate this process? Thanks a lot.
Azure Logic Apps is a great way of doing this
This video has been super helpful, but it leaves me with a question. Azure not only creates a logic app but also two resources called 'API Connections' in the resource group. Can you elaborate on what those are used for?
Thank you for that, a really simple and strait forward video.
I'm still struggling to add a webhook to the logic app that so users can start stop the machine using a weblink.
Excellent video!! But I have a question.... after run, the status became "STOPPED" instead of "Stopped (deallocated)
" .... Does "STOPPED" stop charges? or only "Stopped (deallocated)
" would stop charges?
What I did was to create a second task with 10 minutes of difference to Power Off and Deallocate the VM. I worked pretty well
Would it be possible to build an Azure pipeline which would automatically wake up target SHIR and then let it run for 4 hours?
yes
This is great. How does this extend to the enterprise ? Our setup is large with 100’s of servers in dev. How do I write a schedule for all of them ?
Yes you can also go and create an Azure Logic App for multiple machines. You could group them usimg tags.
Great tip!
Super work, Can i know what is interval while creating task please help me
I get "No task templates found in this region, please try a using a resource located in a different ergion where logic app is available" when I click on add a task. I've already deployed logic apps too
Great video. Is there also a way to automatically deallocate a VM if the user (of the virutal desktop) shuts it down through the OS?
Is there a way to sign in to the VM once it's started? I'm able to turn it on, but I have tasks (specifically, a Power BI data refresh using a Personal Gateway) that only run when I'm logged in. Can I do this somehow in Logic App Designer? Thanks for this video...very helpful to get me started.
Thanks Thomas great video, can you create a video about of runbooks, i'm new in azure your videos and it's very useful.
thank you. Yes, I will do one in the coming weeks. Will take a moment, since I have a couple of others in the pipeline. But I have added your idea to the list! Thank you :)
I have a doubt here.. how do I prevent the pubic IP’s of the VMs from changing whenever there is a start after a shutdown as changing IP address will create a block in the flow
question, can you have the VM's shut down on weekends only?
you are free to configure the shutdown when ever you need it.
Is there a way to schedule Mon-Friday ? i dont see that option ....
Does Auto shut down hurt the OS? like pulling the power cord without shutting it down from inside the OS?
How do I schedule the vm to start Monday to Friday @9am - 5pm?
Hi Thomas how can we do it for multiple VMs at the same time?
Use an Azure Logic App for example :)
It doesnt send me a notification email.
It does the task but no email.
"message": "REST API is not yet supported for this mailbox. This error can occur for sandbox (test) accounts or for accounts that are on a dedicated (on-premise) mail server.",
what does this mean? im not an IT person
Excellent
thanks :)
HI Thomas, this is a great video, but doesnt this just simply stop the VM and not de-allocate it, thus it will still cost money?
This will de-allocate the VM to save costs 😊
Instead of having the task use my credentials, is there a way to have it use an automation Run As or other service account?
Thanks for the video. I trigger the logic apps and get the error message
{
"code": "InvalidAuthenticationTokenTenant",
"message": "The access token is from the wrong issuer
}
I am struggling with same error.. not sure where to start.
Associate an identity to the logic app then update the logic app designer credentials to use the new identity.
Fixed it this way but now I'm getting insufficient permissions error
I want to shutdown azure devtest labs vms when idle, any idea how to go about this ??
Hi Richard, can we do this automation task with the powershell script?
who is Richard ;)
You can also use a PowerShell script in combination with Azure Logic Apps
How can i exclude the weekend? (saturday and sunday)
will it charge user ? i want to set it up for one VM. will it charge ?
Do you think we can schedule the task to run on every second Tuesday of each month?
I am sure you can do that :)
can it be done to azure virtual desktop host pool? Or can we apply it to multiple machines at once
Any additional cost for auto shutdown and power ON the VM ?
i want to schedule to power on from monday to saturday at 9am and it get shutdown at 9Pm and it should be in power off state only on monday and again it should start on monday at 9am?can we schedule like that?
can we implement tag based start and stop the vms using logic apps ?
Yes
@@Thomas_Maurer can you make a video on it
will this costs extra for connecting office 365?
when click Authentication create sign in not coming
is there a popup blocker active?
Does anyone know if it costs to create and run these tasks???
There is a authorization issue here
But in my vm schedule task not show pls help..
same for me. only "send monthly cost" task is available... Working on an West Europe VM
As much as I think this is nice. I dont understand why Microsoft makes such a big issue about this.
Isnt it just Schedule -> Powershell start Azure-VM. Easy done. Why do I need to talk to einstein, every time something very simple has to be done? :D
How to manually shutdown?
hit the shutdown button in the Azure portal? :)
@@Thomas_Maurer no
it's free ??
How do I schedule the vm to start Monday to Friday @8am - 8pm? Thanks