Hi Team, I am working on a PS script to install VSTS agents on my Azure VMs through an Azure DevOps Release Pipeline.
Here in the below script, I am passing a Service Account Password, which is set by my customers. Below script fails whenever Password consist of special characters like
")';:(Code:
.\config.cmd --deploymentgroup --deploymentgroupname DeployGroupSQL --agent $env:COMPUTERNAME
--runasservice
--windowsLogonAccount $(ServiceAccountUser)
--windowsLogonPassword "$(Service_Account_Password)" --work '_work'
--adddeploymentgrouptags --deploymentgrouptags $SQL
--url 'https://dev.azure.com/campusmgmt-product-development/'
--projectname 'Student' --auth PAT --token u4bq6j******************************bhhyq;
I have tried putting whole password into double quotes as well as single quotes but of no help.
This Service Account Password is a Pipeline variable and hence needs to be passed like $(Service_Account_Password).
Can you please suggest on how can I deal with this situation. I have already tried putting this as a here-string, Secure-String, or script parameter but has not proved of any help.
Hoping to hear back soon as this is urgent for my project release.