Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
End {
If ($Input)
{ $Query = $Input -join "`n"
}
If ($Credential)
{ $Security = "uid=$($Credential.UserName);pwd=$($Credential.GetNetworkCredential().Password)"
}
Else
{ $Security = "Integrated Security=True;"
}
If ($MultiSubnetFailover)
{ $MSF = "MultiSubnetFailover=yes;"
Write-Warning "MultiSubnetFailover has been set to on. You must have the SQL 2012 Native Client installed for this to work."
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment