Forum Discussion
lounayong
Copper Contributor
i don't have an answer for your issue but i would like to knwo what don't it means to .
Daniel Westerdale
Dec 18, 2022Iron Contributor
Not sure how I managed to mess up the syntax but once I realised I had a few typos to correct, all was good.
# switched to Windows PowerShell 5.1 and changed to integrated security, to just test the syntax
$SqlConn = New-Object System.Data.SqlClient.SqlConnection("Server = $Server; Database = $Database; Integrated Security=True")
$SqlConn.Open()
# I now have a valid connection!