Issue with SecureString when deploying Azure DB with Visual Studio Online

Damir Dobric Posts

Next talks:

 

    

Follow me on Twitter: #ddobric



 

 

Archives


When trying to deploy SQL Server instance with Visual Studio online, we have experienced some issues with password. To be more precise, deployement worked well, but password was set to some unexpected value. That means nobody was able to to logon. According to documentation, this is how password should be set:

In our script we have used following snippet:

(ConvertTo-SecureString -String '($password)' -AsPlainText -Force)

With this DB was deployed successfully, but password seemed to be set to some unexpected value. The solution for this issue is to put a password value in brackets as shown in following example:

(ConvertTo-SecureString -String ('$(password)') -AsPlainText -Force)

Posted Jan 06 2017, 05:27 PM by Damir Dobric
developers.de is a .Net Community Blog powered by daenet GmbH.