Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
SiddhiGupta10 opened this issue May 1, 2024 · 2 comments
Labels
Automation bug This issue requires a change to an existing behavior in the product in order to be resolved. customer-reported needs-team-attention This issue needs attention from Azure service team or SDK team

Comments

@SiddhiGupta10
Copy link

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
@SiddhiGupta10 SiddhiGupta10 added bug This issue requires a change to an existing behavior in the product in order to be resolved. needs-triage This is a new issue that needs to be triaged to the appropriate team. labels May 1, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added customer-reported needs-triage This is a new issue that needs to be triaged to the appropriate team. and removed needs-triage This is a new issue that needs to be triaged to the appropriate team. labels May 1, 2024
@isra-fel
Copy link
Member

isra-fel commented May 7, 2024

Hi @SiddhiGupta10 are you running the script in an Azure DevOps pipeline?

@isra-fel isra-fel added Automation needs-author-feedback More information is needed from author to address the issue. and removed needs-triage This is a new issue that needs to be triaged to the appropriate team. labels May 7, 2024
@SiddhiGupta10
Copy link
Author

SiddhiGupta10 commented May 7, 2024 via email

@microsoft-github-policy-service microsoft-github-policy-service bot added needs-team-attention This issue needs attention from Azure service team or SDK team and removed needs-author-feedback More information is needed from author to address the issue. labels May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Automation bug This issue requires a change to an existing behavior in the product in order to be resolved. customer-reported needs-team-attention This issue needs attention from Azure service team or SDK team
Projects
None yet
Development

No branches or pull requests

2 participants