Share via

How to restore previous version of runbook after publishing

Sunil 0 Reputation points
2026-02-06T05:19:35.0566667+00:00

How to restore previous version of runbook after publishing?

Azure Automation
Azure Automation

An Azure service that is used to automate, configure, and install updates across hybrid environments.

{count} votes

2 answers

Sort by: Most helpful
  1. Suchitra Suregaunkar 9,505 Reputation points Microsoft External Staff Moderator
    2026-02-12T05:32:51.7933333+00:00

    Hello Sunil

    Thank you for posting your query on Microsoft Q&A platform.

    Azure Automation does not support restoring or rolling back to a previous published version of a runbook. When a runbook is published, it permanently replaces the earlier published version, and Azure Automation does not maintain version history for published runbooks.

    The only supported rollback scenario is reverting a draft to the last published version before publishing. Once published again, rollback is not possible.

    Azure supports recovery only for deleted runbooks (within ~29 days) using PowerShell or REST APIs, which does not apply to version rollback.

    Microsoft recommends maintaining runbooks in an external source control system (such as Azure DevOps or GitHub) and importing them into Azure Automation to manage versions safely.

    What is supported (to avoid confusion):

    1. Revert Draft to Last Published (Only before publishing): If changes are made in Draft and not yet published, you can discard the draft and revert back to the last published version.
    2. Restore a deleted runbook (NOT previous version): If a runbook itself is deleted, Microsoft allows recovery within ~29 days using PowerShell/REST.
    • Supported only for deleted runbooks
    • Does not restore earlier published versions

    What is NOT supported:

    • Restoring a previous published version
    • Viewing published version history
    • Rolling back after publish
    • API / PowerShell / Portal‑based rollback. Azure Automation does not store historical published versions.

    Because rollback is not supported, Microsoft recommends external version control, such as:

    • Azure DevOps Repos
    • GitHub
    • Maintaining source‑controlled runbooks and importing them into Automation

    Thanks,
    Suchitra.

    0 comments No comments

  2. Q&A Assist
    2026-02-06T05:20:43.8733333+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    To restore a previous version of a runbook after publishing, you can revert to the Published version of the runbook. This operation discards any changes made since the runbook was last published and replaces the Draft version with the Published version.

    If you want to restore a deleted runbook, you can do so if it was deleted within the last 29 days. You would need to run a PowerShell script as a job in your Automation account to restore it. Make sure that the Automation account for that runbook exists and that the necessary permissions are granted to the System-assigned managed identity of the Automation account.

    For more detailed steps on restoring deleted runbooks, refer to the Azure documentation on managing runbooks.

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.