-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Closed
Closed
Copy link
Labels
AutomationbugThis issue requires a change to an existing behavior in the product in order to be resolved.This 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 teamThis issue needs attention from Azure service team or SDK team
Description
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
xandris
Metadata
Metadata
Assignees
Labels
AutomationbugThis issue requires a change to an existing behavior in the product in order to be resolved.This 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 teamThis issue needs attention from Azure service team or SDK team