Upload files to "Get Scripts"
This commit is contained in:
@@ -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
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user