mirror of
https://github.com/Icinga/icinga-powershell-framework.git
synced 2025-12-20 23:00:35 -05:00
Improved code styling and small fixes for IcingaUsers
This commit is contained in:
parent
1da13b3eb1
commit
208df5a8bc
1 changed files with 4 additions and 5 deletions
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue