Forum Discussion
Phil123
May 02, 2022Brass Contributor
Azure Policy - Enable Autoshutdown on Azure VM
Hello, it is possible to activate the Azure VM Autoshutdown Function with an Azure Policy? I found always articles with an DevTest Lab. But i would like to use an AZure Policy at the Production ...
- May 05, 2022Hi, Phil.
Yes, it did!
Delete the assignment, re-run it again, and create your Remediation Task with your System Assigned identity. Although not required, if you have an AutoShutdown already configured, you can just set it to 'None' to let the policy configure the correct time etc in one place.
Phil123
Brass Contributor
lukemurraynz
Thanks for this Answer.
I found this Website to. But im a little bit confused about the Fields in the JSON File.
They always use the "DevtestLab" Fields.
Can i use this also for the normal Azure Tenant?
Thanks for this Answer.
I found this Website to. But im a little bit confused about the Fields in the JSON File.
They always use the "DevtestLab" Fields.
Can i use this also for the normal Azure Tenant?
lukemurraynz
May 03, 2022Learn Expert
I haven't personally tried it, but it should work. You can always deploy it to a Resource Group as a test.
- Phil123May 03, 2022Brass ContributorIt doesnt work.
The VM without an Autoshutdown Configuration ist listen at compliant.
Do you have any more Idea?- lukemurraynzMay 04, 2022Learn Expert
Phil123I'm just testing this. Did you set a Remediation Task as part of the deployment so that it can deploy the ComputeVmShutdownTask, if it doesn't exist and make them compliant?
- Phil123May 05, 2022Brass ContributorDid it work as you?
I have done so many tests. I must test it again.
When you say that its work than have i forgot the remediation task i think.