Is Azure Automation Right for My PowerShell Workflow?

0
3
Asked By CodingNinja42 On

I've been using PowerShell for over a decade and made the switch from ISE to VS Code, where I've also set up all my scripts in a private GitHub repository for my company. While I've enjoyed using Zapier, I've hit a few limitations that make me think I could accomplish more with PowerShell. I'm interested in Azure Automation but I have several questions before committing: 1) How does the free execution minutes work? Are they rounded, like if my script runs for 10 seconds, do I get charged for a minute, or does that count as just 10 seconds? 1a) If I run a script locally in VS Code in 10 seconds, can I expect similar performance in Azure, or is there extra overhead? 2) Can I keep editing my scripts in VS Code and commit them to GitHub, letting Azure run the most current version? 3) Can Azure Automation support webhooks for triggering these scripts from other platforms? 4) Does Azure allow scheduling for script executions, like running a script every 30 minutes or on specified days? Ultimately, I'm looking for a straightforward solution to run my GitHub scripts without dealing with numerous scheduled tasks on a local server. Webhook support would be a significant advantage too. I've considered GitHub Actions as well since it seems somewhat related to Azure Automation.

5 Answers

Answered By PowershellPro84 On

1) The documentation on execution time isn't super clear, but honestly, with how pricing usually goes, I'd focus less on the rounding and more on your overall usage. As for the overhead, yes, typically when you execute through Azure, you'll experience some additional spin-up time—averaging around 15-30 seconds, sometimes even longer. So expect some delays compared to local execution.

2) Yes, Azure Automation does integrate well with GitHub, so you can edit your scripts in VS Code and have them pulled directly from your GitHub repo. It works reasonably well, just make sure you're managing your version control.

3) You can create webhooks, but just be mindful of security. Using webhooks might expose your scripts if not properly secured.

4) Scheduled triggers are indeed built-in, allowing you to run your scripts at set intervals or specific times.

Also, GitHub Actions is more of a CI/CD tool, ideal for more complex workflows, but may be overkill if you're only looking to run scripts.

TechieTommy99 -

That's helpful, thanks! Just to clarify, are those spin-up times standard for all scripts?

Answered By CloudCrafter77 On

Check out this link for more on managing Azure Automation environments via PowerShell: doitpshway.com/managing-azure-automation-runtime-environments-via-powershell. Helpful if you want to automate management tasks in Azure.

Answered By NoMoreAzure On

Honestly, I'd avoid Azure Automation altogether; it's not the best route. Instead, consider using Azure Functions, which can provide a more modern and efficient way to run scripts on-demand.

Answered By AutomateWithConfidence On

First of all, all your queries can generally be found in Azure's docs, so definitely check there to verify details. Depending on how complex your needs are, think about looking beyond just PowerShell automation; consider broader configuration management tools that might offer more.

For webhooks, I'd advise against using them unless you have strong security measures in place. They can be risky since anyone with the link can trigger them. Opt for REST APIs if you're looking for secure triggers. Also, yes, you can set scripts to run on schedules through Azure!

Regarding GitHub actions—they're quite different from Azure Automation. Actions tend to be better suited for more comprehensive automation scenarios rather than straightforward script execution.

Answered By ScriptMaster3000 On

I can’t really speak to the free executions since my company uses hybrid workers for our automations and we’ve exceeded any free limits. But we definitely use a version control setup with GitHub to manage our scripts efficiently in Azure. Any change in GitHub updates in Azure automatically, which is how we manage it without issues.

As for webhooks, while technically possible, I suggest being cautious due to security concerns. Schedules are indeed available in Azure Automation, and you can customize triggers like event-based or manual as well!

Also, GitHub Actions is a more advanced tool meant for larger workflows, not just single scripts, so weigh your options depending on what you actually need.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.