Skip to content

Commit

Permalink
Update Get-LocalUsers.psm1
Browse files Browse the repository at this point in the history
  • Loading branch information
TonyPhipps committed Jun 16, 2023
1 parent 442ab5a commit 5bfa964
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Modules/Get-LocalUsers.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ function Get-LocalUsers {
}
.NOTES
Updated: 2022-11-15
Updated: 2023-06-16
Contributing Authors:
Anthony Phipps
LEGAL: Copyright (C) 2022
LEGAL: Copyright (C) 2023
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
Expand Down Expand Up @@ -75,7 +75,7 @@ function Get-LocalUsers {
Foreach ($Result in $ResultsArray) {
$Result | Add-Member -MemberType NoteProperty -Name "Host" -Value $env:COMPUTERNAME
$Result | Add-Member -MemberType NoteProperty -Name "DateScanned" -Value $DateScanned
$Result | Add-Member -MemberType NoteProperty -Name "Groups" -Value (($GroupArray | Where-Object Users -Match $test).Name -join ", ")
$Result | Add-Member -MemberType NoteProperty -Name "Groups" -Value (($GroupArray | Where-Object Users -Match $Result.Name).Name -join ", ")
}

return $ResultsArray | Select-Object Host, DateScanned, Name, Description, SID, PrincipalSource, ObjectClass, Groups, Enabled, FullName, PasswordChangeableDate, PasswordExpires, UserMayChangePassword, PasswordRequired, PasswordLastSet, LastLogon
Expand All @@ -88,4 +88,4 @@ function Get-LocalUsers {
Write-Verbose ("Total time elapsed: {0}" -f $elapsed)
Write-Verbose ("Ended at {0}" -f (Get-Date -Format u))
}
}
}

0 comments on commit 5bfa964

Please sign in to comment.