Skip to content

Commit 732c46e

Browse files
committed
Use NETBIOS name for non-domain hosts instead of hostname
Fixes #49
1 parent 2143c60 commit 732c46e

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
function Get-IcingaNetbiosName()
2+
{
3+
$ComputerData = Get-WmiObject Win32_ComputerSystem;
4+
5+
return $ComputerData.Name;
6+
}

lib/core/tools/Get-IcingaUserSID.psm1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ function Get-IcingaUserSID()
1212
$Domain = $TmpArray[0];
1313
$Username = $TmpArray[1];
1414
} else {
15-
$Domain = Get-IcingaHostname;
15+
$Domain = Get-IcingaNetbiosName;
1616
$Username = $User;
1717
}
1818

0 commit comments

Comments
 (0)