I have a connection string to a SQL Server 2012 DB:
$CONN_STR = "Server=SERVER;Database=mydb;User ID=myuser;Password=abc1$4def;"
I'm creating a connection in PowerShell, but the login fails due to invalid password. I know that the password is correct and validated that in SSMS. I've tested with another account and from what I can tell, the special character in the password is causing the failure.
How can I escape this in the connection string that I use in PowerShell?