Skip to content

Commit 1a27a6b

Browse files
because it needs to be the correct way around #882
1 parent 62df56d commit 1a27a6b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

source/internal/functions/NewGet-AllInstanceInfo.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -275,14 +275,14 @@ function NewGet-AllInstanceInfo {
275275
}
276276
'InstanceConnection' {
277277
#local is always NTLM except when its a container ;-)
278-
if ($Instance.NetBiosName -eq $ENV:COMPUTERNAME -and ($instance.Name -notlike '*,*')) {
278+
if ($Instance.ComputerNamePhysicalNetBIOS -eq $ENV:COMPUTERNAME -and ($instance.Name -notlike '*,*')) {
279+
$authscheme = 'skipped-local'
280+
} else {
279281
if (-not(($__dbcconfig | Where-Object { $_.Name -eq 'skip.connection.auth' }).Value)) {
280282
$authscheme = $instance.Query("Select auth_scheme as AuthScheme FROM sys.dm_exec_connections WHERE session_id = @@SPID").AuthScheme
281283
} else {
282284
$authscheme = 'skipped'
283285
}
284-
} else {
285-
$authscheme = 'skipped-local'
286286
}
287287

288288
if (-not(($__dbcconfig | Where-Object { $_.Name -eq 'skip.connection.ping' }).Value)) {

0 commit comments

Comments
 (0)