added some unneccesary things

This commit is contained in:
Dariy.Nurgaleev
2020-03-20 00:28:25 +07:00
parent 6d42c04772
commit 33fd9bde2e
2 changed files with 2 additions and 2 deletions

View File

@@ -27,9 +27,11 @@ function Test-SqlConnection {
$sqlConnection.Open()
Write-Host -Object "Connection to database: {0} was successful. Version of SQL Express is: {1}" -f $sqlConnection.Database,$sqlConnection.ServerVersion
return $sqlConnection.ServerVersion
} catch {
Write-Host -Object "Connection to SQL Express cannot be established."
exit 1
} finally {
## Close the connection when we're done
$sqlConnection.Close()