Freddy Mora Silva is Senior Technical Consultant at Infront Consulting. Connect with him on LinkedIn.
Azure Automation is a cloud-based configuration service that automatically manages your Azure and non-Azure environments based on your runbooks, update management features, and shared capabilities like access controls, global storage of credentials/certificates/etc, tags, and more.
Included in Azure Automation is the option to extend your libraries. You can import a set of libraries called Modules to your automation account from a preexisting list that can be found in the Gallery or by uploading script files of your own.
Below you’ll see where to upload or choose these Modules.
You may upload by pressing the + Add a module button and selecting a script file or multiple files in zip format.
This option gives you the flexibility to upload your own modules.
This is an easy way to reuse scripts. One key important aspect to consider is that these modules must be created for Azure. This means they require the module manifest file to be included in the zip file. If it is not there, Azure cannot load it automatically.
Another option is to search within the Gallery:
This allows you to search from different publishers (mainly Microsoft) with Module libraries that are required for implementing common automation tasks, such as Azure Storage mdlets, PowerShell management, and much more. You can find modules for Azure, Azure Storage, ARM Profile, Azure AD, and others more specific to certain technologies like Windows Update, PosSSH, SQLServer, and much more.
Just select the module(s) you want to add to your automation account, and you will be prompted if you need other modules or versions before installation.
What I find very important is the very detailed information about the different cmdlets included in the module. This includes links to the documentation; in some cases to the PS Gallery or website, the current version, number of downloads, or date of last version update.
When you import your new Module, you will be prompted to accept it:
Once the import process is completed, the new module will be listed:
You can also update all the Modules to the most recent versions by clicking the Update Azure Modules button at the top of the list.
Now you’ve installed your first Modules and you’re ready to start Automating!