azure-automation-runbook

Create Azure Automation PowerShell runbooks using Az modules and Managed Identity.

Updated Jun 6, 2026
One-click install
npx skills add https://github.com/janegilring/powershell-ai-skills-and-mcp --skill azure-automation-runbook
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: azure-automation-runbook
Source: https://github.com/janegilring/powershell-ai-skills-and-mcp/tree/main/demos/skill-demos/azure-automation/runbook-skill
Command: npx skills add https://github.com/janegilring/powershell-ai-skills-and-mcp --skill azure-automation-runbook

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Azure Automation runbooks can be hard to author in a way that follows Microsoft's current conventions and guards, leading to inconsistent deployments. This skill guides creating PowerShell runbooks that use Az modules (not AzureRM), Managed Identity authentication, idempotent operations, structured output, and a portal-compatible header.

Core Features & Use Cases

  • Import only the Az modules you actually need with explicit version pins.
  • Authenticate via Managed Identity and set context for the subscription, avoiding hard-coded credentials.
  • Enforce idempotent design and produce structured, JSON-friendly output suitable for automation pipelines.
  • Include the metadata header the Azure Portal expects for runbooks and schedules.
  • Use cases include creating runbooks for scheduled tasks, webhook-triggered automation, and on-demand maintenance in Azure Automation.

Quick Start

Ask for an Azure Automation runbook that uses Az modules with Managed Identity, adheres to idempotent patterns, and emits structured output with the required header metadata.

Frequently Asked Questions about azure-automation-runbook

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create an Azure Automation runbook with Managed Identity?

To create an Azure Automation runbook with Managed Identity, you author a PowerShell script using Az modules, authenticate via Managed Identity, set the subscription context, and include the required Azure Portal metadata header.

What is the best way to structure PowerShell output for Azure Automation runbooks?

The best way to structure PowerShell output for Azure Automation runbooks is to emit structured, JSON-friendly output. This ensures automation pipelines can reliably parse the results of idempotent operations.

Does Azure Automation support AzureRM modules for new runbooks?

Azure Automation does not support AzureRM modules for new runbooks following current conventions. You must use Az modules instead, importing only the specific modules you need with explicit version pins.

How do I make my Azure Automation runbook idempotent?

To make an Azure Automation runbook idempotent, you design the PowerShell logic so repeated executions produce the same result without side effects, ensuring safe provisioning, maintenance, and monitoring operations.

Can I attach an Azure Automation runbook to a webhook?

Yes, you can attach an Azure Automation runbook to a webhook. Runbooks authored with Az modules, Managed Identity authentication, and portal-compatible headers support scheduled tasks and webhook-triggered automation.

Why does my Azure Automation runbook fail to authenticate in the portal?

An Azure Automation runbook may fail to authenticate if it uses hard-coded credentials or AzureRM modules. Authenticating via Managed Identity and setting the subscription context avoids these authentication failures.