Azure Devops pipeline throwing error while running powershell script – The string is missing the terminator: “

  Kiến thức lập trình

I’m trying to register schedule for Azure automation runbook by using below PS command

Register-AzureRmAutomationScheduledRunbook -AutomationAccountName $automationAccount -ResourceGroupName $automationRg -RunbookName $runBookName -ScheduleName $scheduler.Name -Parameters @{"RESOURCEGROUP"="test-rg";"APPNAME"="test-app-del";"SUBSCRIPTIONID"="test-sub";"BRAND"="MS";"ENV"="dev"} -ErrorAction Stop

The script is executing fine in local machine and able to register schedule for runbook. But when the same code being executed for azure devops pipeline I’m getting below error.
The string is missing the terminator: ".

I tried different suggestions provided to find if there are any special characters in the commandlet. But no luck.

Could you please help in resolving the error

LEAVE A COMMENT