mirror of
https://github.com/Icinga/icinga-powershell-framework.git
synced 2025-12-21 07:10:15 -05:00
parent
825ee4c666
commit
a45d0e2fbb
2 changed files with 7 additions and 1 deletions
6
lib/core/icingaagent/getters/Get-IcingaNetbiosName.psm1
Normal file
6
lib/core/icingaagent/getters/Get-IcingaNetbiosName.psm1
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
function Get-IcingaNetbiosName()
|
||||||
|
{
|
||||||
|
$ComputerData = Get-WmiObject Win32_ComputerSystem;
|
||||||
|
|
||||||
|
return $ComputerData.Name;
|
||||||
|
}
|
||||||
|
|
@ -12,7 +12,7 @@ function Get-IcingaUserSID()
|
||||||
$Domain = $TmpArray[0];
|
$Domain = $TmpArray[0];
|
||||||
$Username = $TmpArray[1];
|
$Username = $TmpArray[1];
|
||||||
} else {
|
} else {
|
||||||
$Domain = Get-IcingaHostname;
|
$Domain = Get-IcingaNetbiosName;
|
||||||
$Username = $User;
|
$Username = $User;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue