Quantcast
Channel: SQL Server Setup & Upgrade forum
Viewing all articles
Browse latest Browse all 7696

Escaping special characters in a configuration string

$
0
0

Hi,

I have a PS script which sometimes fails, I have been doing some troubleshooting to find out why, what i have noticed is that special characters within the SA password string makes it fail.

Please see the example below.

$install = 'E:\Setup.exe /ConfigurationFile=D:\BUILD\SQL.ini /Q /IAcceptSQLServerLicenseTerms '  

$install = $install + " /SAPWD=`'$sa_password`'"  + " /ACTION=Install"


#This was the bit failing when I examined the string.
#/SAPWD='_=p+IowrlXkB' /ACTION=Install



Viewing all articles
Browse latest Browse all 7696

Trending Articles