Hello John, apologies for the delay, we have checked with our backend team, and we got update that, since the PowerShell 7.1 and 7.2 is deprecated and are no longer supported. The recommendation is to try out PowerShell 7.4 version and use module version which is compatible with PowerShell 7.4.
Here are the steps you can follow to update your runbook:
Create Runtime environment
- Go to the Azure portal > select your Automation account.
- Under Process Automation > select Runtime Environments.
If you don't find Runtime Environments in the list, select Try Runtime environment experience in the Overview page to switch to the new portal interface.
Then select Runtime Environments under Process Automation.
- Select Create to create a new PowerShell 7.4 Runtime.
- On the Basics tab, provide the following details.
- On the Packages tab, in the Package version dropdown list, you would see default Az and Azure CLI packages already present.
- Select +Add from gallery to add more packages from gallery and select Next.
- On the Review + create tab, review the entries and select Create.
A notification appears to confirm that a Runtime environment is successfully created.
Update Runtime environment of runbook to PowerShell 7.4:
- Go to Azure portal > select you're In the Automation account > Runbooks page, select the runbook linked to old PowerShell Runtime environment that you want to update. Then click on Update Runtime Environment > select the new Runtime environment (PowerShell 7.4) > click update > click on refresh. You can see the Run time is update.
- Make changes in the runbook code to ensure compatibility with PowerShell 7.4.
You can follow the below documents that helps you to Update runbook from PowerShell 7.1 to PowerShell 7.4.
Update PowerShell Runbook in Azure Runtime Environment - Azure Automation | Microsoft Learn
Hope this helps, please let us know if you encounter any issue. Thanks