Table of contents
TOC
Collapse the table of content
Expand the table of content

Get-PnPGroup

Bert Jansen|Last Updated: 2/20/2017
|
1 Contributor

Returns a specific group or all groups.

Syntax

Get-PnPGroup [-Web <WebPipeBind>]
             [-Identity <GroupPipeBind>]
Get-PnPGroup [-AssociatedMemberGroup [<SwitchParameter>]]
             [-Web <WebPipeBind>]
Get-PnPGroup [-AssociatedVisitorGroup [<SwitchParameter>]]
             [-Web <WebPipeBind>]
Get-PnPGroup [-AssociatedOwnerGroup [<SwitchParameter>]]
             [-Web <WebPipeBind>]
Get-PnPGroup [-Web <WebPipeBind>]
             [-Includes <String[]>]

Returns

List

Parameters

ParameterTypeRequiredDescription
AssociatedMemberGroupSwitchParameterFalseRetrieve the associated member group
AssociatedOwnerGroupSwitchParameterFalseRetrieve the associated owner group
AssociatedVisitorGroupSwitchParameterFalseRetrieve the associated visitor group
IdentityGroupPipeBindFalseGet a specific group by name
IncludesString[]FalseSpecify properties to include when retrieving objects from the server.
WebWebPipeBindFalseThe web to apply the command to. Omit this parameter to use the current web.

Examples

Example 1

PS:> Get-PnPGroup

Returns all groups

Example 2

PS:> Get-PnPGroup -Identity 'My Site Users'

This will return the group called 'My Site Users' if available

Example 3

PS:> Get-PnPGroup -AssociatedMemberGroup

This will return the current members group for the site

© 2017 Microsoft