Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Try {
$Records = $DataAdapter.Fill($DataSet)
If ($DataSet)
{ $DataSet.Tables[0] | Add-Member -MemberType NoteProperty -Name Instance -Value $SQLServer
Write-Output $DataSet.Tables[0]
}
Else
{ Write-Warning "Query did not return any records"
}
}
Catch {
Write-Warning "$($_.Exception.Message)"
}
$SqlConnection.Close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment