Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Using the Runtime environment, you can upgrade a runbook from one Runtime version to the other by creating a different Runtime environment and then linking the runbook to it. You can follow similar steps for updating Python runbooks.
Note
PowerShell 7.1 and Python 2.7 are no longer supported by their respective parent products PowerShell and Python. We recommend that you update outdated runbooks to latest supported versions using Runtime environment.
- An Azure Automation account (in any supported Public regions except Central India, Germany North, Italy North, Israel Central, Poland Central, UAE Central, and Government clouds).
- A PowerShell 5.1 runbook in Azure Automation.
Note
Instead of creating a new PowerShell 7.2 Runtime environment, you can use the System-generated PowerShell 7.2 Runtime environment.
Sign in to the Azure portal and select your Automation account.
Under Process Automation, select Runtime Environments (preview). If you don't find Runtime Environments (preview) in the list, select Try Runtime environment experience to switch to the new portal interface.
Select Create to create a new PowerShell 7.2 Runtime.
On Basics tab, provide the following details:
- Provide Name for the Runtime environment. It must begin with alphabet and can contain only alphabets, numbers, underscores, and dashes.
- From the Language dropdown list, select PowerShell.
- In Runtime version for scripting language, select 7.2.
- Provide appropriate Description.
On Packages tab, in the Package version dropdown list, you would see Az version 8.3.0 and Azure CLI version 2.56.0 packages already present.
Select +Add from gallery to add more packages from gallery and select Next.
On Review + create tab, review the entries and select Create.
A notification appears to confirm that a Runtime environment is successfully created.
In the Automation account | Runbooks page, select the runbook linked to PowerShell 5.1 Runtime environment that you want to update.
Select Edit in portal.
Select Runtime environment from the dropdown to view the list of compatible Runtime environments that you can link to the runbook. Here, select the Runtime environment that you created in Runtime environment for PowerShell 7.2.
Make changes in the runbook code to ensure compatibility with PowerShell 7.2.
Select Test pane to test the upgraded runbook before you publish it.
After confirmation that the test results are as expected, select Publish to publish the runbook to production. On the Runbooks list page, you can see the same runbook linked to PowerShell 7.2 Runtime environment.
- See Manage Runtime environment to view the various operations through portal and REST API.