Forum Discussion
fweymouth
Jun 15, 2022Copper Contributor
Passing credentials to SQL connection string
Hello. I am new to PowerShell and would really appreciate some help! I have a working script (Example A) which allows me to connect to SQL servers in my current domain using windows authenticatio...
fatherjack
Jun 20, 2022Copper Contributor
I'd recommend looking at the DbaTools module as that includes an Invoke-DbaQuery function which, like most of its hundreds of other funnctions, allows you to pass in credentials as a parameter for authentication at the SQL Server as your chosen domain user