Created
November 30, 2014 12:48
-
-
Save martin9700/ba9bf0455e2a008c150c to your computer and use it in GitHub Desktop.
This file contains 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
ForEach ($SQLServer in $Instance) | |
{ $ConnectionString = "data source=$SQLServer,1433;Initial catalog=$Database;$Security;$MSF" | |
$SqlConnection = New-Object System.Data.SqlClient.SqlConnection | |
$SqlConnection.ConnectionString = $ConnectionString | |
$SqlCommand = $SqlConnection.CreateCommand() | |
$SqlCommand.CommandText = $Query | |
$DataAdapter = New-Object System.Data.SqlClient.SqlDataAdapter $SqlCommand | |
$DataSet = New-Object System.Data.Dataset |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment