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

how connect to sql server as different user using powershell ?

$
0
0
Example $instanceName ="Host001\Server1,14002" $AppName = "$($ENV:computername.ToString())_$(($MyInvocation.MyCommand).Path)" $conn = new-object Microsoft.SqlServer.Management.Common.ServerConnection $conn.ServerInstance = $instanceName $conn

Viewing all articles
Browse latest Browse all 467

Trending Articles