Automation Community Gallery – Finding the right building blocks for your automation processes

As a PowerShell user, you have inevitably faced the struggle of starting to author a script with a blank page in front of you. After looking at your editor for a few minutes, you have searched online for examples of what you want to do and then downloaded and modified the examples you found.

Azure Automation now offers community runbook and module content from within the Automation experience in Azure Preview Portal. In the Classic Azure Portal, you can still use the Azure Automation runbook gallery to find runbook content.

The community gallery in Automation provides a centralized location for the building blocks you need to create your automated processes, and helps streamline the runbook and DSC configuration authoring process.

Deploy modules to Azure Automation from the PowerShell Gallery, allowing you to bring in cmdlets and DSC resources.

Community Runbook Gallery: The ability to browse runbooks from Script Center from within Automation.

We have more enhancements to come, but let’s talk about what is available today.

Modules in the PowerShell Gallery

One of the first things you’ll likely want to do when integrating with other systems is find existing module(s) that manage the particular system you’re using. Once you download, or in Azure Automation’s case, upload the module, you can then use those cmdlets / DSC resources to build out your runbooks and DSC configurations.

The PowerShell Gallery has both regular PowerShell modules and modules that contain DSC resources. You can import and use these modules in Azure Automation. Note that if the module contains an Automation connection file, a connection type for that module will also be created in Azure Automation. To learn more about authoring modules see Authoring integration modules.

The PowerShell team already has some great posts on the PowerShell Gallery:

You will be taken to the PowerShell Gallery where you can search for Modules in order to find the module you need.

If you’ve been using the PowerShell Gallery, you may have noticed a new addition to the module details page – the Deploy to Azure Automation button.

Deploy a module to Azure Automation from the PowerShell Gallery

When you click the “Deploy to Azure Automation” button, you will be redirected to the Azure portal and asked to log in if you are not already. Once authenticated, the Azure Resource Manager deployment wizard blade will load and you will need to provide the necessary information to add the module to your Automation account. View documentation here.

New or existing: Selects whether or not to deploy a new Automation account or use an existing one.

Automation Account Name: The name of the Automation account to deploy the module in.

Location: The region to deploy your Automation account in. This parameter is ignored if you select an existing account.

Once you click “OK” the module is deployed to a new or existing Automation account. Note: Although the legal terms confirmation button reads “Buy,” importing a module to Azure Automation is always free. You will only be charged if you switch the plan on your Automation account to basic and run runbook jobs or have nodes under DSC management (see pricing for more detail).

As part of the deployment process, once the module is saved to your Automation account, the activities are extracted from the module. Depending on the size of the module, it could take a few minutes before the cmdlets in the module are ready to be used. You can view the notification to track the progress of the module load.

Runbooks

Once you’ve uploaded the modules you need into your Automation account, you can begin authoring runbooks using these cmdlets. The Automation community gallery supports PowerShell, PowerShell Workflow and Graphical runbooks.

Once you are in the community runbook list, you can search the name, description, tag or author to find the runbook you’re looking for.

When you have identified the runbook you want to import, select it then preview the code to make sure it is what you are looking for. You can also link to the runbook source, which will currently link to TechNet Script Center. This allows you to read any comments on the runbook and TechNet terms of use.

Finally, click the Import button at the top of the Preview blade then enter a name and an optional description for the runbook. Once complete, your runbook will be imported to your Automation account and will appear in your runbooks list. This runbook is your own copy to customize as needed to fit your specific needs.

Publishing runbooks

Any PowerShell script, PowerShell Workflow, or Graphical runbooks that you publish to Script Center under the Azure category will be loaded to the Azure Automation Gallery. Read our documentation for more information on contributing runbook content.

What’s next?

The Automation team is currently working on allowing you to import modules from the PowerShell Gallery.

Our team is also working on providing some complete solutions to walk you through an end-to-end scenario to help you get started in Automation. You can view these solutions on the Azure Automation documentation page.

New to Automation?

Are there solutions you want to see, features you want added, or have some feedback on existing features? Let us know on Azure Automation UserVoice.

Just getting started with Azure Automation? Learn about the service here, and follow Azure Automation on Twitter.