Find Local Groups

by Jul 22, 2011

On Windows 7, net.exe can list all local groups. To use this information with PowerShell, try this simple wrapper:

function Get-LocalGroup {
  net localgroup | Where-Object { $_.StartsWIth('*') } | ForEach-Object { $_.SubString(1) }
}

 

Twitter This Tip!
ReTweet this Tip!