Azure / Azure-DataFactory

Other
483 stars 589 forks source link

Error while running the PrePostDeploymentScript.ps1 for Post Deployment Operation #523

Closed ajaymedauy closed 1 year ago

ajaymedauy commented 1 year ago

While running the Post deployment task using the provided powershell script "PrePostDeploymentScript.ps1" and the following parameters :

-armTemplate "$(System.DefaultWorkingDirectory)/" -ResourceGroupName -DataFactoryName -predeployment $false -deleteDeployment $true

I get the below error :

[error]At C:\a\r1\a_\ArmTemplates\PrePostDeploymentScript.ps1:470 char:74+ ... parameterType = $templateParameters.$($parameterName).value ? $templa ...+                                                                 ~Unexpected token '?' in expression or statement.

[error]PowerShell exited with code '1'.

ajaymedauy commented 1 year ago

Solved by selecting the option "User Powershell Core" in the Azure Powershell task.