Runbook and module galleries for Azure Automation
Rather than creating your own runbooks and modules in Azure Automation, you can access scenarios that have already been built by Microsoft and the community.
You can get PowerShell runbooks and modules from the PowerShell Gallery and Python runbooks from the Script Center Gallery. You can also contribute to the community by sharing scenarios that you develop, see Adding a runbook to the gallery
Runbooks in PowerShell Gallery
The PowerShell Gallery provides a variety of runbooks from Microsoft and the community that you can import into Azure Automation. To use one, download a runbook from the gallery, or you can directly import runbooks from the gallery, or from your Automation Account in the Azure portal.
You can only import directly from the PowerShell Gallery using the Azure portal. You cannot perform this function using PowerShell.
You should validate the contents of any runbooks that you get from the PowerShell Gallery and use extreme caution in installing and running them in a production environment.
To import a PowerShell runbook from the Runbook Gallery with the Azure portal
In the Azure portal, open your Automation account.
Under Process Automation, click on Runbooks gallery
Select Source: PowerShell Gallery.
Locate the gallery item you want and select it to view its details. On the left, you can enter additional search parameters for the publisher and type.
Click on View source project to view the item in the TechNet Script Center.
To import an item, click on it to view its details and then click the Import button.
Optionally, change the name of the runbook and then click OK to import the runbook.
The runbook appears on the Runbooks tab for the Automation Account.
Adding a PowerShell runbook to the gallery
Microsoft encourages you to add runbooks to the PowerShell Gallery that you think would be useful to other customers. The PowerShell Gallery accepts PowerShell modules and PowerShell scripts. You can add a runbook by uploading it to the PowerShell Gallery.
Graphical runbooks are not supported in PowerShell Gallery.
Modules in PowerShell Gallery
PowerShell modules contain cmdlets that you can use in your runbooks, and existing modules that you can install in Azure Automation are available in the PowerShell Gallery. You can launch this gallery from the Azure portal and install them directly into Azure Automation. You can also download them and install them manually.
To import a module from the Automation Module Gallery with the Azure portal
In the Azure portal, open your Automation account.
Select Modules under Shared Resources to open the list of modules.
Click Browse gallery from the top of the page.
On the Browse gallery page, you can search by the following fields:
- Module Name
- Cmdlet/DSC resource name
Locate a module that you're interested in and select it to view its details.
When you drill into a specific module, you can view more information. This information includes a link back to the PowerShell Gallery, any required dependencies, and all of the cmdlets or DSC resources that the module contains.
To install the module directly into Azure Automation, click the Import button.
When you click the Import button, on the Import pane, you see the module name that you're about to import. If all the dependencies are installed, the OK button is activated. If you're missing dependencies, you need to import those dependencies before you can import this module.
On the Import page, click OK to import the module. While Azure Automation imports a module to your account, it extracts metadata about the module and the cmdlets. This action may take a couple of minutes since each activity needs to be extracted.
You receive an initial notification that the module is being deployed and another notification when it has completed.
After the module is imported, you can see the available activities. You can use its resources in your runbooks and Desired State Configuration.
Modules that only support PowerShell core are not supported in Azure Automation and are unable to be imported in the Azure portal, or deployed directly from the PowerShell Gallery.
Python Runbooks are available in the Script Center gallery. You can contribute Python runbooks to the Script Center gallery by clicking Upload a contribution. When you do, ensure that you add the tag Python when uploading your contribution.
In order to upload content to Script Center a minimum of 100 points is required.
Requesting a runbook or module
Common solutions available in the runbook gallery
The list below contains a few runbooks that provide solutions to common scenarios. For a full list of runbooks created by the Azure Automation team, see AzureAutomationTeam profile.
- Update-ModulesInAutomationToLatestVersion - Imports the latest version on PowerShell Gallery of all modules in an Automation account.
- Enable-AzureDiagnostics - This script configures Azure Diagnostics and Log Analytics to receive Azure Automation logs containing job status and job streams.
- Copy-ItemFromAzureVM - This runbook copies a remote file from a Windows Azure virtual machine.
- Copy-ItemFromAzureVM - This runbook copies a local file to an Azure virtual machine.
- To get started with runbooks, see Manage runbook in Azure Automation
- To understand the differences between PowerShell and PowerShell Workflow with runbooks, see Learning PowerShell workflow
- For more information on PowerShell, including language reference and learning modules, refer to the PowerShell Docs.