Upload files to "Get Scripts"

This commit is contained in:
2025-08-05 15:07:26 +00:00
parent fa52052b3e
commit 9ab1fd4eaa
@@ -0,0 +1,10 @@
Get-LocalUser |
ForEach-Object {
$user = $_
return [PSCustomObject]@{
"Computer-Name" = hostname
"User" = $user.Name
"Groups" = Get-LocalGroup -ErrorAction SilentlyContinue | Where-Object { $user.SID -in ($_ | Get-LocalGroupMember -ErrorAction SilentlyContinue | Select-Object -ExpandProperty "SID") } | Select-Object -ExpandProperty "Name"
"Enabled" = $user.Enabled
}
}