diff --git a/lib/core/icingaagent/getters/Get-IcingaNetbiosName.psm1 b/lib/core/icingaagent/getters/Get-IcingaNetbiosName.psm1 new file mode 100644 index 0000000..3414891 --- /dev/null +++ b/lib/core/icingaagent/getters/Get-IcingaNetbiosName.psm1 @@ -0,0 +1,6 @@ +function Get-IcingaNetbiosName() +{ + $ComputerData = Get-WmiObject Win32_ComputerSystem; + + return $ComputerData.Name; +} diff --git a/lib/core/tools/Get-IcingaUserSID.psm1 b/lib/core/tools/Get-IcingaUserSID.psm1 index a6822ac..422d784 100644 --- a/lib/core/tools/Get-IcingaUserSID.psm1 +++ b/lib/core/tools/Get-IcingaUserSID.psm1 @@ -12,7 +12,7 @@ function Get-IcingaUserSID() $Domain = $TmpArray[0]; $Username = $TmpArray[1]; } else { - $Domain = Get-IcingaHostname; + $Domain = Get-IcingaNetbiosName; $Username = $User; }