Note
Access to this page requires authorization. You can try signing in or .
Access to this page requires authorization. You can try .
Set-SPOSiteOffice365Group
Connects a top-level SPO site collection to a new Microsoft 365 Group.
Syntax
Default (Default)
Set-SPOSiteOffice365Group
[-Site] <SpoSitePipeBind>
[-DisplayName] <String>
[-Alias] <String>
[-IsPublic]
[[-Description] <String>]
[[-Classification] <String>]
[-KeepOldHomepage]
[<CommonParameters>]
Description
Connects a top-level SPO site collection to a new Microsoft 365 Group. You must be at least a SharePoint Online administrator to run the cmdlet and be a site collection administrator of the site.
If the site doesn't exist, this cmdlet returns a "File not found" error.
Examples
Example 1
This example creates a new Microsoft 365 Group named "site1group" and connects site collection https://contoso.sharepoint.com/sites/site1 to it. The group will have its 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
Parameters
-Alias
Applicable: SharePoint Online
Specifies the email alias for the new Microsoft 365 Group that will be created.
Parameter properties
| Type: | System.String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-Classification
Applicable: SharePoint Online
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 Microsoft Entra 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.
Parameter properties
| Type: | System.String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-Description
Applicable: SharePoint Online
Specifies the group's description.
Parameter properties
| Type: | System.String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-DisplayName
Applicable: SharePoint Online
Specifies the name of the new Microsoft 365 Group that will be created.
Parameter properties
| Type: | System.String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-IsPublic
Applicable: SharePoint Online
Determines the Microsoft 365 Group's privacy setting. If switch is included, the group will be public, otherwise it will be private.
Parameter properties
| Type: | System.Management.Automation.SwitchParameter |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-KeepOldHomepage
Applicable: SharePoint Online
For sites that already have a modern page set as homepage, you can specify whether you want to keep it as the homepage.
Parameter properties
| Type: | System.Management.Automation.SwitchParameter |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-Site
The site collection being connected to new Office 365 Group.
Parameter properties
| Type: | Microsoft.Online.SharePoint.PowerShell.SpoSitePipeBind |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
Inputs
Microsoft.Online.SharePoint.PowerShell.SpoSitePipeBind
Outputs
System.Object
Feedback
Was this page helpful?
