Adding Activities And Tests To The Azure RunBook

Azure Automation

Now, let's get started with the steps, given below:

Add activities to the Runbook

Step 1. In the Library control, click search textbox and type Write-Output. The search results will be displayed , as given below:

Write-Output

Step 2. Next, click Write-Output and select Add to canvas.

Write-Output
Step 3. Next, click the Write-Output activity on the canvas. Type Label Name and select the InputObject parameter. Next, in the data source dropdown, select PowerShell expression. Finally, in the Expression box, type "Hello Run Book" and click OK twice to return to the canvas.

Write-Output

Step 4. Next, save Runbook by clicking Save.

Save

Test the Runbook

Step 5. Click Test pane to open the Test blade.

Test pane

Step 6. Click Start to start the test.

Start

After some time, Runbook job completes and its output is displayed.

output

Summary. In this blog, we discussed, how to add the activities and test Azure Runbook in Azure portal.