Set-SPOSiteOffice365Group

Connects a top-level SPO site collection to a new Office 365 Group.

Syntax

Set-SPOSiteOffice365Group
     -Site <string>
     -DisplayName  <string>
     -Alias <string>
     [-IsPublic]
     [-Description <string>]
     [-Classification <string>]
     [-KeepOldHomepage]  
   [<CommonParameters>]

Description

Connects a top-level SPO site collection to a new Office 365 Group. You must be a SharePoint Online global administrator to run the cmdlet.

Important

This cmdlet is currently in preview and is subject to change. It is not currently supported for use in production environments.

If the site doesn’t exist, this cmdlet returns a “File not found” error.

Examples

Example 1

This example creates a new Office 365 Group named "site1group" and connects site collection https://contoso.sharepoint.com/sites/site1 to it. The group will privacy set to "Private" and Classification set to "Highly Confidential".

Set-SPOSiteOffice365Group ` 
  -Site https://contoso.sharepoint.com/sites/site1 ` 
  -DisplayName "site1group" ` 
  -Alias "site1group" ` 
  -Classification "Highly Confidential" `

Example 2

This example creates a new Office 365 Group named "classicsite" and connects site collection https://contoso.sharepoint.com/sites/classicsite to it. It will keep the old home page from the classic site.

Set-SPOSiteOffice365Group ` 
  -Site https://contoso.sharepoint.com/sites/classicsite ` 
  -DisplayName "Classic Site" ` 
  -Alias "classicsite" ` 
  -KeepOldHomepage `

Required Parameters

-Alias

Specifies the email alias for the new Office 365 Group that will be created.

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

Specifies the group’s description.

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

Specifies the name of the new Office 365 Group that will be created.

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

The site collection being connected to new Office 365 Group.

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

Optional Parameters

-Classification

Specifies the classification value, if classifications are set for the organization. If no value is provided, the default classification will be set, if one is configured.

See Azure Active Directory cmdlets for configuring group settings and follow the steps in the Create settings at the directory level to define the classification for Office 365 groups.

See Manage Office 365 Groups with PowerShell for more information.

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

Determines the Office 365 Group’s privacy setting. If switch is included, the group will be public, otherwise it will be private.

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

For sites that already have a modern page set as homepage, you can specify whether you want to keep it as the homepage.

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