Get-PnPSiteGroup
SYNOPSIS
Required Permissions
- SharePoint: Access to the SharePoint Tenant Administration site
Gets all the groups in the current or specified site collection.
SYNTAX
Get-PnPSiteGroup
[-Group <String>]
[-Site <SitePipeBind>]
DESCRIPTION
Use the Get-PnPSiteGroup cmdlet to get all the groups on the specified or currently connected site collection.
EXAMPLES
EXAMPLE 1
Get-PnPSiteGroup
Returns all SharePoint groups in the current connected to site
EXAMPLE 2
Get-PnPSiteGroup -Site "https://contoso.sharepoint.com/sites/siteA"
This will return all SharePoint groups in the specified site
EXAMPLE 3
Get-PnPSiteGroup -Group "SiteA Members"
This will return the specified group for the current connected to site
EXAMPLE 4
Get-PnPSiteGroup -Group "SiteA Members" -Site "https://contoso.sharepoint.com/sites/siteA"
This will return the specified group for the specified site.
PARAMETERS
-Site
Retrieve the associated member group.
Type: String
Parameter Sets: (All)
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Group
Specifies the group name.
Type: String
Parameter Sets: (All)
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False