Get-Group

Gets local groups.

Syntax

Get-Group [[-Name] <String>] [<CommonParameters>]

Description

Gets all local groups or a specific group by its name.

Related Commands

Parameters

Name Type Description Required? Pipeline Input Default Value
Name String The name of the group to return. false false

Return Values

System.DirectoryServices.AccountManagement.GroupPrincipal.

EXAMPLE 1

Get-Group

Demonstrates how to get all local groups.

EXAMPLE 2

Get-Group -Name RebelAlliance

Demonstrates how to get a specific group.