I'm a Linux, Windows, Android, Drupal, MySQL, Apache, Wordpress, IIS, Security - Analyst, Admin, Technician, Developer Guy - and - I Need A Place to Write it All Down....

Search

Categories

Azure Automation – Jumping Subscriptions – One Automation Account – Multiple Subscriptions

nbeam published 11 months ago in Authentication, Azure, Development, Fun, Microsoft, Powershell. Tags: Automating multiple subscriptions, AZ Powershell, Azure Automation, Single Azure Automation Account

1

I work on Azure Tenants that utilize multiple subscriptions in their design. I wanted to centralize my Azure Automation work and use a single Automation account. By default, I found that powershell scripts I fired off from Azure Automation work within the subscription that the Automation account was created within. But business requirements necessitate multiple subscriptions and MY requirements necessitate using a single Automation Account to simplify my life (and the lives of everyone else that I work with). A running joke is that, when it comes to IT, well-intention’d laziness is a virtue… We rebrand laziness as “simplicity,” “automation,” and/or “efficiency,” depending on the context of the conversation of course. I often say somewhat tongue-n-cheek that “you don’t want your IT department to be “busy” all the time.” An all-the-time overly busy IT department typically means that something was poorly planned and/or your network is being held together with spit and frayed ethernet cable. Anyhow, I digress…

With that groundwork laid, the goal is a Powershell automation script that can essentially “hop” subscriptions as needed. I also value modularity. Goodness knows that in the pursuit of laziness we should never do the same work twice except in the most extreme or dire circumstances. To that end, I wrote a simple function I could just drop into any script along with an additional parameter and now said script can be used across subscriptions…
(more…)

© KiloRoot 2021 All rights reserved. View Privacy Policy