Get-SPOSiteGroup

Gets all the groups on the specified site collection.

Syntax

Get-SPOSiteGroup
   [-Group <String>]
   [-Limit <Int32>]
   -Site <SpoSitePipeBind>
   [<CommonParameters>]

Description

Use the Get-SPOSiteGroup cmdlet to get all the groups on the specified site collection by using the Site parameter.

You must be a SharePoint Online global administrator and a site collection administrator to run the cmdlet.

For permissions and the most current information about Windows PowerShell for SharePoint Online, see the online documentation at http://go.microsoft.com/fwlink/p/?LinkId=251832 (http://go.microsoft.com/fwlink/p/?LinkId=251832).

Examples

-----------------------EXAMPLE 1-----------------------------

Get-SPOSiteGroup -Site http://contoso.sharepoint.com/sites/siteA

This example returns all the groups on the specified site collection http://contoso.sharepoint.com/sites/siteA.

Required Parameters

-Site

Specifies the site collection scope.

Type:SpoSitePipeBind
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Online

Optional Parameters

-Group

Specifies the group name.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Online
-Limit

Specifies the maximum number of site collections to return. To retrieve all of the site collections, use Limit ALL. The default value is 200.

Type:Int32
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Online