Hi @Ed Summ ,
Hopefully, this helps you.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I have written a Powershell script which removes firewall rules that match specific naming conditions from specific SQL databases in Azure. I have tested the Powershell script in Azure Cloud Shell, and it works as intended.
I want to schedule this to run automatically each day. I thought this is something that can be scheduled with 'Azure Automation', but it appears I am mistaken. It seems Automation is a tool for running scripts on resources, not in Azure CLI itself.
This seems like a simple task, but I am having trouble finding a solution. What would be the best approach to achieve this?
Thanks,
Ed
Hi there,
Just to clarify. Azure supports different options to deploy your scenario, including Azure PowerShell, Azure CLI, Azure ARM (or bicep) or direct RestAPI calls to ARM.
If you have developed a Powershell based script, you can definitely use Azure Automation Account that supports PowerShell natively. If you have developed a CLI script, it requires to be triggered where CLI is installed (sadly, Azure Automation doesn't support this today).
Can you clarify what type of script you are going to use?
p.s. check the difference between Azure CLI and Powershell
https://learn.microsoft.com/en-us/cli/azure/what-is-azure-cli
https://learn.microsoft.com/en-us/azure/developer/azure-cli/choose-the-right-azure-command-line-tool
Hi @Ed Summ ,
Thank you for the question. The link provided by @T. Kujala above should help you get started with Azure Automation.
In addition to the resource above, I would like to clarify the following points related to "..It seems Automation is a tool for running scripts on resources, not in Azure CLI itself."
You may also refer to the link here to get a detailed walkthrough of similar scenario to get started - https://learn.microsoft.com/en-us/answers/questions/915711/index.html
Please let us know if you have any questions.
---
Please 'Accept as answer' if it helped so that it can help others in the community looking for help on similar topics.