We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d74d290 commit bac3ca2Copy full SHA for bac3ca2
source/internal/functions/NewGet-AllInstanceInfo.ps1
@@ -284,11 +284,14 @@ function NewGet-AllInstanceInfo {
284
$authscheme = 'skipped'
285
}
286
287
-
288
- if (-not(($__dbcconfig | Where-Object { $_.Name -eq 'skip.connection.ping' }).Value)) {
289
- $pingu = New-Object System.Net.NetworkInformation.Ping
290
- $timeout = 1000 #milliseconds
291
- $ping = ($pingu.Send($instance.ComputerName, $timeout)).Status
+ if ($IsWindows) {
+ if (-not(($__dbcconfig | Where-Object { $_.Name -eq 'skip.connection.ping' }).Value)) {
+ $pingu = New-Object System.Net.NetworkInformation.Ping
+ $timeout = 1000 #milliseconds
+ $ping = ($pingu.Send($instance.ComputerName, $timeout)).Status
292
+ } else {
293
+ $ping = 'skipped'
294
+ }
295
} else {
296
$ping = 'skipped'
297
0 commit comments