How to use Powershell to import a runbook and set runtime version to 7.1?

asked 2021-11-23T11:24:53.91+00:00
Mark 6 Reputation points

I can successfully import a Powershell Runbook to Azure but it sets the runtime version to 5.1 and I need 7.1 because of system managed identity....

$params = @{
AutomationAccountName = 'my-managed-automaton'
Name = 'uploaded-runbook'
ResourceGroupName = 'my-automation-rg'
Type = 'PowerShell'
Path = '/runbookpath/startvm.ps1'
}
Import-AzAutomationRunbook @/params

The above works but will set to runtime version to 5.1. How do I make it set runtime version to 7.1?

Azure Automation
Azure Automation
An Azure service that is used to automate, configure, and install updates across hybrid environments.
684 questions
1 vote