Azure Automation Runbooks are not stable with Publish/Save

Mavvoorn 0 Reputation points
2026-05-21T07:45:25.58+00:00

Title:
Azure Automation Runbook publish unreliable / parameters inconsistent

Message:

When editing PowerShell runbooks in Azure Automation (Portal), the publish action frequently hangs or does not complete.

Additionally:

  • Parameters sometimes disappear from schedule binding UI
  • Requires artificial changes (adding whitespace) to trigger publish success

Environment:

  • Azure Automation Runbook (PowerShell 5.1)
  • Portal-based editing Question: Is this a known issue and is there a recommended stable workflow?

Observation: Behavior suggests portal/UI cache or backend sync inconsistency.

Azure Automation
Azure Automation

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


1 answer

Sort by: Most helpful
  1. Sina Salam 31,456 Reputation points Volunteer Moderator
    2026-05-29T17:35:14.3266667+00:00

    Hello Mavvoorn,

    Welcome to the Microsoft Q&A and thank you for posting your questions here.

    I understand that you are experiencing unreliable Azure Automation PowerShell 5.1 runbook Save/Publish behavior in the Azure portal, including publish actions hanging, needing a fake whitespace change before publishing succeeds, and runbook parameters intermittently disappearing from the schedule binding UI.

    The issue should be treated as a portal authoring/publish-path reliability problem, not as a runbook parameter design failure. Azure Automation officially supports a safer and deterministic workflow where the runbook is edited outside the portal, imported as a draft, and published using PowerShell or REST instead of relying on the portal Publish button. - https://learn.microsoft.com/en-us/azure/automation/automation-edit-textual-runbook, https://learn.microsoft.com/en-us/powershell/module/az.automation/publish-azautomationrunbook?view=azps-15.6.0, https://learn.microsoft.com/en-us/rest/api/automation/runbook/publish?view=rest-automation-2024-10-23

    The best practice resolution is to:

    • Stop using the Azure portal editor as the primary Save/Publish mechanism for this runbook.
    • Edit the runbook locally or through the Azure Automation VS Code extension.
    • Import the updated .ps1 file into Azure Automation as the draft version.
    • Publish the draft using Publish-AzAutomationRunbook.
    • Manage schedule parameter bindings with Register-AzAutomationScheduledRunbook, not repeated portal edits.
    • If schedule parameter values must change, unregister and recreate the runbook schedule binding.
    • If values change frequently, move them into Automation Variables or another external configuration source instead of repeatedly changing schedule parameters.

    After moving publish and schedule-parameter binding to the supported PowerShell/REST control plane, the runbook lifecycle becomes stable: draft replacement, publishing, and schedule parameter registration are handled directly by Azure Automation APIs rather than the portal UI. - use this link https://learn.microsoft.com/en-us/azure/automation/shared-resources/schedules, with above for more steps and affirmation.

    If publishing still fails through PowerShell or REST, then the issue is no longer portal-only. At that point, collect the runbook name, Automation account region, exact UTC timestamps, repro steps, screenshots/errors, exported script, and module versions, then open an Azure support case for service-side investigation. - https://learn.microsoft.com/en-us/azure/automation/troubleshoot/collect-data-microsoft-azure-automation-case, https://learn.microsoft.com/en-us/azure/automation/automation-manage-send-joblogs-log-analytics

    Use the associated links for more reading, affirmation and steps.

    I hope this is helpful! Do not hesitate to let me know if you have any other questions, steps or clarifications.


    Please don't forget to close up the thread here by upvoting and accept it as an answer if it is helpful.

    Was this answer helpful?

    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.