Last active
February 5, 2018 19:08
-
-
Save phwelo/4c994865e49dd3def92ba5679bc681de to your computer and use it in GitHub Desktop.
[Connection String Builder] Builds a connection string based on parameters #Powershell #SQL
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function New-ConnectionString($Server,$Catalog,[bool]$PersistSecurity,$User,$Password) { | |
$ConnectionString = "Data Source=$Server;Initial Catalog=$Catalog;Persist Security Info=$([string]$PersistSecurity);User ID=$User;Password=$Password" | |
return $ConnectionString | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment