If you'd like to get a list of all local Groups on your computer, you can use this line:
Get-WMIObject Win32_Group -filter "domain='$env:computername'" |
select name,SID
This uses WMI to retrieve all Groups where the domain part is equal to your local computer name and returns the Group name and SID.
Posted
May 15 2009, 08:00 AM
by
ps1