Improved list-user-groups.ps1

This commit is contained in:
Markus Fleschutz
2021-02-06 13:50:21 +01:00
parent 8ba4c8887c
commit fe16d787c5
3 changed files with 3 additions and 4 deletions

View File

@ -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])"