Quantcast
Channel: SQLServerCentral » Programming » Powershell » Latest topics
Viewing all articles
Browse latest Browse all 467

connect to sql server with AD user object

$
0
0
Is there some way I can connect to a SQL Server using an Active Directory user object? Something along the lines of this pseudocode:$User = get-aduser "domain\Some_user_that_isn't_me"$Connection = new-object sqlserver.connection $User$Connection.ConnectionString = "server=myserver; integratedsecuriry=$True"$Connection.Connect()Thanks!

Viewing all articles
Browse latest Browse all 467

Latest Images

Trending Articles



Latest Images