Skip to content

Import-AzAutomationRunbook cmd : Runbook type 'PowerShell72' not supported Β #24779

@SiddhiGupta10

Description

@SiddhiGupta10

Description

Unable to import PowerShell automation runbook of runtime 7.2; runbook_type : "PowerShell72"

Import command is throwing invalid type error.

Issue script & Debug output

Following command returns an error when run on Self hosted agent.

        [pscustomobject]@{
        RunbookName='listSharePointUsersPermission';
        OutputFolderPath=$outputfolderpath;
        SourcePath=$sourcepath;
        RunbookType="PowerShell72";
        Tags=@{"Workload Name"="Development Testing Services"}
        }

            Import-AzAutomationRunbook `
            -AutomationAccountName $targetAutomationAccountName `
            -Name $eachLine.RunbookName `
            -Path $eachLine.SourcePath `
            -Published `
            -ResourceGroupName $targetResourceGroupName `
            -Type $eachLine.RunbookType `
            -Force;

Environment data

Running on linux self-hosted agent.
AzurePowerShell@5 task

Module versions

azurePowerShellVersion: 'LatestVersion'

Error output

Cannot validate argument on parameter 'Type'. The argument "PowerShell72" does not belong to the set "PowerShell,GraphicalPowerShell,PowerShellWorkflow,GraphicalPowerShellWorkflow,Graph,Python2,Python3" specified by the ValidateSet attribute. Supply an argument that is in the set and then try the command again.
Failed

Metadata

Metadata

Assignees

No one assigned

    Labels

    AutomationbugThis issue requires a change to an existing behavior in the product in order to be resolved.customer-reportedneeds-team-attentionThis issue needs attention from Azure service team or SDK team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions