i want to do certificate based authentication for SQL using powershell.
My current code is below for building connection with database:
##SQL PART
$connString = "Data Source=$SqlServer;Database=$Database;User ID=$SqlAuthLogin;Password=$SqlAuthPw"
#Create a SQL connection object
$conn = New-Object System.Data.SqlClient.SqlConnection $connString
#Attempt to open the connection
$conn.Open()
I can't use any other ways to pass password as there are some limitations.
As I'm new to this what further steps should I take to do certificate based authentication will really be helpfull.
Thanks