Improved code styling and small fixes for IcingaUsers

This commit is contained in:
Lord Hepipud 2019-08-19 12:12:11 +02:00
parent 01ebbaf085
commit 3b23cadf08

View file

@ -1,18 +1,17 @@
function Get-IcingaUsers () function Get-IcingaUsers()
{ {
param ( param (
[array]$Username [array]$Username
); );
if ($null -eq $Username) { if ($null -eq $Username) {
return Get-LocalUser; return Get-LocalUser;
} else { } else {
[array]$UserInformation [array]$UserInformation = @();
foreach ($UniqueUser in $Username) { foreach ($UniqueUser in $Username) {
[array]$UserInformation += Get-LocalUser -Name $UniqueUser; $UserInformation += (Get-LocalUser -Name $UniqueUser);
} }
} }
return $UserInformation; return $UserInformation;
} }