An Azure service that is used to automate, configure, and install updates across hybrid environments.
The runbook code can be recovered even if the portal and content endpoints return 404, as long as there are past jobs for that runbook.
Use the job’s source snapshot to restore it:
- In the Azure portal, go to the affected Automation Account.
- Open Jobs (Runbook Jobs) and locate a previous successful job for the problematic runbook.
- Open that job and select View source snapshot.
- Copy the full script shown in the snapshot.
- Create a new runbook in the same Automation Account (or edit the existing broken one if the editor opens) and paste the copied script.
- Save and publish the new/updated runbook.
This recreates the runbook content from the last executed version, which is the only option when there is no separate backup.
References:
- Is it possible to restore previous version of runbook once published? - Microsoft Q&A
- Troubleshoot runbook execution issues in Azure Automation
- Troubleshoot runbook execution issues when using PowerShell in Azure Automation
- Troubleshoot error codes during runbook execution in Azure Automation
- Troubleshoot runbook issues
- Troubleshoot shared resource issues