mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-01-23 06:08:36 +01:00
Improved list-user-groups.ps1
This commit is contained in:
parent
8ba4c8887c
commit
fe16d787c5
@ -46,7 +46,7 @@ list-random-passwords.ps1, prints a list of random passwords
|
||||
list-random-pins.ps1, prints a list of random PIN's
|
||||
list-scripts.ps1, lists the PowerShell scripts in this repository
|
||||
list-timezones.ps1, lists all time zones available
|
||||
list-user-groups.ps1, lists all user groups
|
||||
list-user-groups.ps1, lists the user groups on the local computer
|
||||
locate-city.ps1, prints the geographic location of the given city
|
||||
locate-ipaddress.ps1, prints the geographic location of the given IP address
|
||||
locate-zip-code.ps1, prints the geographic location of the given zip-code
|
||||
|
|
@ -54,7 +54,7 @@ The following PowerShell scripts can be found in the [Scripts/](Scripts/) subfol
|
||||
* [list-random-pins.ps1](Scripts/list-random-pins.ps1) - prints a list of random PIN's
|
||||
* [list-scripts.ps1](Scripts/list-scripts.ps1) - lists the PowerShell scripts in this repository
|
||||
* [list-timezones.ps1](Scripts/list-timezones.ps1) - lists all time zones available
|
||||
* [list-user-groups.ps1](Scripts/list-user-groups.ps1) - lists all user groups
|
||||
* [list-user-groups.ps1](Scripts/list-user-groups.ps1) - lists the user groups on the local computer
|
||||
* [locate-city.ps1](Scripts/locate-city.ps1) - prints the geographic location of the given city
|
||||
* [locate-ipaddress.ps1](Scripts/locate-ipaddress.ps1) - prints the geographic location of the given IP address
|
||||
* [locate-zip-code.ps1](Scripts/locate-zip-code.ps1) - prints the geographic location of the given zip-code
|
||||
|
@ -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])"
|
||||
|
Loading…
Reference in New Issue
Block a user