Created
May 6, 2021 06:38
-
-
Save hugotai101/d5e96fc62daf988968ba56aa6b6b9c66 to your computer and use it in GitHub Desktop.
Powershell
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
$ServerName = '192.168.1.188' | |
$DatabaseName = 'Dbname' | |
$UserName = 'username' | |
$password = 'password' | |
$connectionString = 'Data Source={0};database={1};User ID={2};Password={3}' -f $ServerName,$DatabaseName,$userName,$password | |
$sqlConnection = New-Object System.Data.SqlClient.SqlConnection $connectionString | |
$sqlConnection.Open() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment