Configure

Set Home site for SharePoint online tenant

This sample script sets a communication site as a home site for SharePoint online tenant

Summary

This sample script shows how to set a communication site as a home site for SharePoint online tenant.

Scenario inspired from this blog post: Set up a home site in SharePoint Online

Outupt Screenshot

powershell

# SharePoint tenant admin site collection url
$adminSiteUrl = "https://<tenant>-admin.sharepoint.com"

# Communication site collection url
$commSiteUrl = "https://<tenant>.sharepoint.com/communicationsite"

# Connect to SharePoint Online site
Connect-SPOService -Url $adminSiteUrl

# Set communication site as the home site
Set-SPOHomeSite -HomeSiteUrl $commSiteUrl

Contributors

Disclaimer

THESE SAMPLES ARE PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.

Tool documentation & references

Keep exploring