Learn how to create, publish and run your first Azure Automation runbook using PowerShell and the Azure CLI. This step-by-step guide walks through setting up an Automation account, creating a runbook, and executing it in Azure.
Source: How to Create Your First Azure Automation Runbook with PowerShell