Use this when writing runbook steps with expected results and failure handling.
Steps · Runbook Automation
Steps in a runbook are the ordered actions, each with what to do, expected result and what to do if it fails, so they can be followed or automated reliably.
1. Steps perform actions in order.
2. Idempotent.
3. Clear errors.
4. Stop on failure by default.
5. Log each step.
step → result → next
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Verification path Verify boundary
The negative fixture should deliberately exercise risks such as stale documentation, hidden prerequisites, copy/paste ambiguity, unreviewed examples, broad parameters, irreversible steps and runbook completion without target verification, choosing the cases most relevant to step action/shell/uses identity, inputs/env, condition, outputs and conclusion, plus correlation to the external side effect made by the step.
Step 2 Common mistakes Narrow the fault
- Combining several changes in one step.
- No expected output.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
- Each step has an action, expected result and failure handling.
- Steps are ordered.
- Good steps can be automated directly.
- Step definitions — actions
- Per-step error handling — stop/continue
- Step logs — detail
ReferenceWhy it matters1 section · depth on demand
What it is
Runbook steps should be atomic, ordered and verifiable: one action, one check.
ReferenceImportant terms & boundaries2 sections · depth on demand
In depth
Runbook steps are the individual actions in a procedure. Each step should be unambiguous enough that two people following it do the same thing, and observable enough that it is clear whether it worked.
Step template:
| Part | Example |
|---|---|
| Action | Shut interface Gi1/0/24 on sw-oslo-07 |
| Command | interface Gi1/0/24 / shutdown |
| Expected result | Interface administratively down |
| Check | show interfaces Gi1/0/24 status shows disabled |
| If not | Stop; go to rollback |
This structure maps directly onto automation: action and command become a task, the check becomes an assertion, and "if not" becomes error handling.
Example
1. show standby brief → expect Active on R1
2. interface Gi0/1 shutdown → expect R2 Active within 10 s
3. ping 10.0.0.1 from client → expect replies
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Runbook Automation > Steps. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://learn.microsoft.com/en-us/azure/automation/automation-runbook-types · confidence 94%