List Local Groups

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
Concentrated Tech NSoftware Dell Compellent Sponsored by Idera and Concentrated Tech and NSoftware and Dell Compellent
Copyright 2011 PowerShell.com. All rights reserved.