Skip to content

Instantly share code, notes, and snippets.

@martin9700
Created November 30, 2014 12:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save martin9700/8249d9143043cb80aa4a to your computer and use it in GitHub Desktop.
Save martin9700/8249d9143043cb80aa4a to your computer and use it in GitHub Desktop.
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