Azure Automation – ISE Add-On Editing Runbooks

image

Well it has been a while since last post, because there is a lot going on in my private life as also in my job. But now some “tasks” are completed and I will have more time for community work again. Microsoft product machinery is running at high speed in all areas. One tool I really appreciate is the ISE add-On for Azure Automation. I have written quite a lot of runbooks in the past for SMA using regular ISE and Visual Studio but a tool for writing runbooks which integrates into the SMA environment is missing. This add-On integrates seamlessly into your ISE environment and lets you write runbooks for Azure Automation in different flavors like regular PowerShell scripts and PowerShell workflows and executes them using Azure Automation. As a target you are able to choose either Azure itself or a Hybrid Worker Group. Joe Levy (PM Azure Automation) has already written a post about this add-on. I would like to dive a bit more into this.

How does it look like?

As you can see it seamlessly integrates into ISE…

image

How do I install it?

The installation is quite easy, depending on your needs. The ISE add-on module is available from PowerShell Gallery . Just open ISE and run

> Install-Module AzureAutomationAuthoringToolkit -Scope CurrentUser

Then, if you want the PowerShell ISE to always automatically load the add-on, run:

> Install-AzureAutomationIseAddOn

Otherwise, whenever you want to load the add-on, just run the following in the PowerShell ISE:

> Import-Module AzureAutomationAuthoringToolkit

The add-on will prompt you to update if a newer version becomes available.

How does it work?

I just started ISE and on the right side of the ISE there you can provide all necessary configuration. You are able to connect to Azure with your account and subscription in the Configuration tab…

image

As soon you are connected, you are able to manually download existing runbooks and assets or upload locally created runbooks and assets…

image

If you leave the default, all your configuration like runbooks and assets gets downloaded into your user profile path…

image

…within that folder and some folder hopping you find the actual files…

C:\Users\StefanRoth\AutomationWorkspace\[Subscription]\[Ressource Group]\[Automation Account]

image

if you look at the encrypted (SecureLocalAssets.json) and unencrypted (LocalAssets.json) files you will see this…

image

The strange thing is, that the connection strings are saved within the encrypted file although they are not encrypted.

What’s cool?

Well you are able to run your PowerShell scripts or PowerShell workflows either on Azure or on your Hybrid Worker Group, the output will be displayed in a separated window…

image

Right from ISE you are able to create the scripts or workflows…

image

…and of course all necessary Assets either encrypted or not…

image

Conclusion:

It is a very lightweight tool that works just right. I really like this approach and hope Microsoft will do the same for SMA. Few enhancements I would suggest are:

  • Some sort of grouping in a folder structure for runbooks and assets
  • Managing the runbooks with some Tags for classification
  • Having some sort of version control, like integration into TFS Online
  • Dependency view (TreeView) to see which child runbook belongs to which parent runbook
  • SMA integration

I hope this gives you a good overview of this add-On! Download the source code here

2 Comments

  1. “The strange thing is, that the connection strings are saved within the encrypted file although they are not encrypted.” – if the connection has any encrypted fields, those will be encrypted. That’s why we put connections in the encrypted file.

  2. Pingback: Luper's Learnings - Azure Technical Community for Partners (March 2016) - Luper’s Learnings - Site Home - TechNet Blogs

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s