We're Hiring!
Take the next step in your career and work on diverse technology projects with cross-functional teams.
LEARN MORE
Mountain West Farm Bureau Insurance
office workers empowered by business technology solutions
BLOG
10
18
2018
3.1.2023

How to Run Azure Automation Runbook Locally While Accessing Assets

Last updated:
10.28.2020
3.1.2023

When you work with Azure Automation, you might find yourself coding locally, putting all the initial logic into the script, copying and pasting the code to the web to run it, and then testing the code from the portal.

Usually this practice takes longer to execute and will require a printout of variables or comments to follow the code execution, as you are not debugging your script.

There is another, possibly better, way to get your PowerShell code into Azure.

You can install an add-on on your local machine that allows you to connect to Azure and interact with the different automation components. You can easily download and use this add-on locally, giving you the ability to debug your code. It is called Azure Automation PowerShell ISE add-on.

Install it with either of these two options:

You can install the ISE add-on module from PowerShell Gallery with:

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.

 

What can you do with the Azure Automation Powershell ISE Add On?

Once you installed it will appear like this.


We have multiple tabs: Configuration, Runbooks, DSC, Assets and Modules. Let's take a look at each.

Configuration

Here you will sign in to Azure and select the Automation Account you wish to use.


After you log in with your credentials, a folder is created where all components are downloaded.
 

Runbooks

This tab allows you to create, open, download, upload, delete and even test a draft version or a runbook in Azure.

DSC

This tab allows you to create, open, download, upload, delete and even compile a Desire State Configuration file in Azure.



Assets

I think this is the most important area in the ISE Add-On—you can create, edit locally, download, upload, insert, or delete different assets like Credentials, Connections, Variables, or Certificates.



Modules

Like the last one, this is one of the main tabs. It allows you to see, delete, upload and select the storage to use for any module.

Get Started

Once you installed and logged in you can test your code with the same commands that you have, and you can easily debug it in the same way as any normal PowerShell code you have built before. Enjoy!

Recent Blog Posts

lunavi logo alternate white and yellow
4.5.2024
03
.
27
.
2024
Utilizing Bicep Parameter Files with ALZ-Bicep

Ready to achieve more efficient Azure Deployments? You can use Bicep parameters instead of JSON which opens new opportunities for deployment. Let Lunavi expert, Joe Thompson, show you how.

Learn more
lunavi logo alternate white and yellow
3.26.2024
03
.
04
.
2024
Anticipating Surges in Cyber Attacks and Bolstering Your InfoSec Defenses in 2024

Learn how to navigate 2024 with the right InfoSec defenses to protect your organization against a rising number of cyber attacks.

Learn more
lunavi logo alternate white and yellow
3.26.2024
01
.
03
.
2024
Microsoft Copilot is Re-Shaping the Innovation Frontier

Microsoft 365 Copilot has been released, and it's changing the way we work. More than OpenAI or ChatGPT, read how Copilot can seamlessly integrate with your workflow.

Learn more