Gets local groups.
Get-Group [[-Name] <String>] [<CommonParameters>]
Get-Group gets all local groups or a specific group by its name.
The objects returned,
DirectoryServices.AccountManagement.GroupPrincipal, use external resources, which means they don't clean up propertly when garbage collected, resulting in memory leaks. You should call
Dispose() on the objects you receieve from this function when you're done using them so these external resources can be cleaned up correctly.
Get-Group is new in Carbon 2.0.
|Name||Type||Description||Required?||Pipeline Input||Default Value|
The name of the group to return.
Demonstrates how to get all local groups.
Get-Group -Name RebelAlliance
Demonstrates how to get a specific group.