mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-08-11 13:53:42 +02:00
Improved list-user-groups.ps1
This commit is contained in:
@ -1,14 +1,13 @@
|
||||
#!/snap/bin/powershell
|
||||
<#
|
||||
.SYNTAX ./list-user-groups.ps1
|
||||
.DESCRIPTION lists all user groups
|
||||
.DESCRIPTION lists the user groups on the local computer
|
||||
.LINK https://github.com/fleschutz/PowerShell
|
||||
.NOTES Author: Markus Fleschutz / License: CC0
|
||||
#>
|
||||
|
||||
try {
|
||||
Get-LocalGroup
|
||||
Get-LocalGroupMember -name users
|
||||
exit 0
|
||||
} catch {
|
||||
write-error "ERROR in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||
|
Reference in New Issue
Block a user