Azure Automation Runbooks
The Azure Automation Process feature supports several types of runbooks, as defined in the following table. However, there are following considerations when determining which type to use for a particular runbook.
- Firstly, you can’t convert automation runbooks from graphical to text type, or the other way around.
- Secondly, there are limitations when using automation runbooks of different types as child runbooks.
Graphical Runbooks
Using the graphical editor in the Azure portal, you may build and edit graphical and graphical PowerShell Workflow runbooks. Another tool, on the other hand, cannot be used to generate or change this sort of runbook. The following are the main characteristics of graphical runbooks:
- Firstly, it can be exported to files in your Automation account and then imported into another Automation account.
- Secondly, it generates PowerShell code.
- Lastly, it can be converted to or from graphical PowerShell Workflow runbooks during import.
Advantages
- Firstly, use visual insert-link-configure authoring model.
- Secondly, focus on how data flows through the process.
- Thirdly, it visually represents management processes.
- Moreover, it includes other runbooks as child runbooks to create high-level workflows.
- Lastly, encourage modular programming.
Limitations
- Firstly, it can’t create or edit outside the Azure portal.
- Secondly, it might require a code activity containing PowerShell code to execute complex logic.
- Thirdly, it can’t convert to one of the text formats, nor can you convert a text runbook to graphical format.
- Lastly, it can’t run runbooks on a Linux Hybrid Runbook Worker.
PowerShell Runbooks
Windows PowerShell is the foundation for PowerShell runbooks. Additionally, you may change the runbook’s code directly in the Azure portal’s text editor. You may also load the runbook into Azure Automation using any offline text editor.
Advantages
- Firstly, implement all complex logic with PowerShell code without the additional complexities of PowerShell Workflow.
- Secondly, start faster than PowerShell Workflow runbooks, since they don’t need to be compiled before running.
- Lastly, run in Azure and on Hybrid Runbook Workers for both Windows and Linux.
Limitations
- Firstly, you must be familiar with PowerShell scripting.
- Secondly, runbooks can’t use parallel processing to execute multiple actions in parallel. Moreover, they can’t use checkpoints to resume runbooks if there’s an error.
- Lastly, you can include only PowerShell Workflow runbooks and graphical runbooks as child runbooks by using the Start-AzAutomationRunbook cmdlet, which creates a new job.
PowerShell Workflow Runbooks
Text runbooks based on Windows PowerShell Workflow are known as PowerShell Workflow runbooks. Furthermore, you may change the runbook’s code directly in the Azure portal’s text editor. You may also load the runbook into Azure Automation using any offline text editor.
Advantages
- Firstly, implement all complex logic with PowerShell Workflow code.
- Then, use checkpoints to resume operation if there’s an error.
- After that, use parallel processing to do multiple actions in parallel.
- Lastly, can include other graphical runbooks and PowerShell Workflow runbooks as child runbooks to create high-level workflows.
Limitations
- Firstly, you must be familiar with PowerShell Workflow.
- Secondly, runbooks must deal with the additional complexity of PowerShell Workflow, such as deserialized objects.
- Thirdly, you can only include PowerShell runbooks as child runbooks by using the Start-AzAutomationRunbook cmdlet.
- Lastly, runbooks can’t run on a Linux Hybrid Runbook Worker.
Python Runbooks
Python 2 is necessary to compile runbooks. However, you may change the runbook’s code directly in the Azure portal’s text editor. As a result, you may use an offline text editor to create the runbook and then import it into Azure Automation.
Advantages
- Firstly, use the robust Python libraries.
- Moreover, you can run in Azure or on Linux Hybrid Runbook Workers.
Limitations
- Firstly, you must be familiar with Python scripting.
- However, only Python 2 is supported presently. Any Python 3-specific functions fail.
- Lastly, to use third-party libraries, you must import the packages into the Automation account.
Reference: Microsoft Documentation