An Azure service that is used to automate, configure, and install updates across hybrid environments.
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
.ps1file 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.