Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes to add export functions for Roles #5954

Merged
merged 10 commits into from
Aug 14, 2019
Prev Previous commit
Next Next commit
Revert "uncaught exception"
This reverts commit dba2f85.
  • Loading branch information
potatoqualitee committed Aug 11, 2019
commit 118767c3739eda862ec1f0f1577d8f0e8edb5e60
9 changes: 2 additions & 7 deletions functions/Test-DbaConnection.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -112,13 +112,8 @@ function Test-DbaConnection {
Write-Message -Level Verbose -Message "Testing ping to $($instance.ComputerName)"
$ping = New-Object System.Net.NetworkInformation.Ping
$timeout = 1000 #milliseconds

try {
$reply = $ping.Send($instance.ComputerName, $timeout)
$pingable = $reply.Status -eq 'Success'
} catch {
$pingable = $false
}
$reply = $ping.Send($instance.ComputerName, $timeout)
$pingable = $reply.Status -eq 'Success'

try {
$server = Connect-SqlInstance -SqlInstance $instance.FullSmoName -SqlCredential $SqlCredential
Expand Down