11,295 total views, 1 views today
In this “Setup home site SharePoint” article, we will learn about how to set up a home site in SharePoint Online using the PowerShell script.
What you will learn from this article?
- Introduction to home site app in SharePoint Online
- Capabilities of Home Site in SharePoint Online
- Set up a home site for your organization using the PowerShell script
Introduction to home site app in SharePoint Online: Setup home site SharePoint
The home site feature is newly introduced by Microsoft where we can design a more sophisticated user-friendly community site that can be used as a landing page for all users in your intranet. We can have news, events, embedded video and conversations, and other resources to deliver an engaging experience that reflects your organization’s voice, priorities, and brand, and it must be a modern communication site.
Capabilities of Home Site in SharePoint Online: Setup home site SharePoint
- The home site is easily accessible both from the SharePoint mobile app (Android and iOS). All users that have access to the home site will see a home button on the Find tab of the mobile app. Homesites are designed to be mobile-friendly from the start as the site is built based on the communication site template.
- Search for the site is scoped to global – meaning it can be searched from all sites within the organization.
- The site is automatically set up as an organization news site (what is an organization news site will discuss later in another article).
- On the in-home site, we can configure the global navigation in the SharePoint app bar.
- In Homesite, we can use the Viva Connections (we will write a separate article on viva connections)
- Once the site has been converted into a home site – it becomes a SharePoint home site app.
- The SharePoint home site can be configured as an app inside Microsoft Teams.
Set up a home site for your organization using the PowerShell script
Using the below PowerShell script, we can convert a modern communication site to the home site:
####The below script is used to convert the modern communication site to a home site. cls $PSshell = Get-PSSnapin "Microsoft.SharePoint.PowerShell" -ErrorVariable err -ErrorAction SilentlyContinue if($PSshell -eq $null) { Add-PSSnapin "Microsoft.SharePoint.PowerShell" } $fileName = "ConvertToHomeSiteUsingPowerShell" #'yyyyMMddhhmm yyyyMMdd $enddate = (Get-Date).tostring("yyyyMMddhhmmss") $logFileName = $fileName +"_"+ $enddate+"_Log.txt" $invocation = (Get-Variable MyInvocation).Value $directoryPath = Split-Path $invocation.MyCommand.Path $directoryPathForLog=$directoryPath+"\"+"LogFiles" if(!(Test-Path -path $directoryPathForLog)) { New-Item -ItemType directory -Path $directoryPathForLog #Write-Host "Please Provide Proper Log Path" -ForegroundColor Red } $logPath = $directoryPathForLog + "\" + $logFileName $isLogFileCreated = $False function Write-Log([string]$logMsg) { if(!$isLogFileCreated){ Write-Host "Creating Log File..." if(!(Test-Path -path $directoryPath)) { Write-Host "Please Provide Proper Log Path" -ForegroundColor Red } else { $script:isLogFileCreated = $True Write-Host "Log File ($logFileName) Created..." [string]$logMessage = [System.String]::Format("[$(Get-Date)] - {0}", $logMsg) Add-Content -Path $logPath -Value $logMessage } } else { [string]$logMessage = [System.String]::Format("[$(Get-Date)] - {0}", $logMsg) Add-Content -Path $logPath -Value $logMessage } } #Paramaters area $adminSiteURL="https://globalsharepoint2020-admin.sharepoint.com" $homeSiteURL="https://globalsharepoint2020.sharepoint.com/sites/Home" #Paramaters area - Ends try { Connect-SPOService -Url $adminSiteURL #Command Syntax #Set-SPOHomeSite -HomeSiteUrl #Command example Set-SPOHomeSite -HomeSiteUrl $homeSiteURL Write-Host "The site has been converted to a home site Successfully" -BackgroundColor Green } catch { $ErrorMessage = $_.Exception.Message +"in converting to home site!:" Write-Host $ErrorMessage -BackgroundColor Red Write-Log $ErrorMessage }
Notes:
- The account that runs the script should be a global administrator role.
- The home site should be a modern communication site.
SharePoint home site examples – Setup home site SharePoint
After executing the script, if we navigate to the home site URL, we can see the below screen:
There click on the gear icon from the top right corner link.

From the site settings, under the SharePoint section, we can see the “Global navigation” link to configure which indicates that this is a home site app – this was not there before converting or running the script.
Note:
The global navigation link from the SharePoint site settings page indicates that this is a home site and a modern communication site can be converted to a home site only using the PowerShell command – as of today, there is no option in the SharePoint Online Admin Center tool where we can do this conversion.
Summary: What do we have here (Setup home site SharePoint)?
Thus, in this article, we have learned the below with respect to setting up the home site in SharePoint Online:
- Introduction to home site app in SharePoint Online
- Capabilities of Home Site in SharePoint Online
- Set up a home site for your organization using the PowerShell script
- SharePoint home site examples
- How to set up a landing site for your organization on the intranet using the SharePoint Online home site app
- How to configure the home site app in SharePoint Online tenant?
See Also: SharePoint PowerShell
You may also like the following SharePoint PowerShell tutorials:
- How to replace root site in SharePoint Online from Microsoft 365?
- How to create hub site in SharePoint Online using PnP PowerShell?
- [Verified]: Find all InfoPath forms in SharePoint using PowerShell
- [Verified]: Remove recycle bin items in SharePoint using PowerShell
- [Verified]: Cancel SharePoint workflows using PowerShell
- SharePoint Online: Remove custom app using PnP PowerShell
- Office 365: How to create content type in SharePoint Online using PowerShell?
- Office 365: How to create document library in SharePoint Online using PowerShell?
- Export SharePoint user information list to CSV(Excel) file using PowerShell
- How to fix “The term ‘Get-MsolUser’ is not recognized as the name of a cmdlet”
- How to fix the “The term ‘Get-SPWeb’ is not recognized as the name of a cmdlet, function” PowerShell error
- How to hide quick launch menu in SharePoint online using PnP PowerShell
- Edit user Permission is greyed Out SharePoint Online
- Get workflow inventory from SharePoint online using PowerShell CSOM
- Create a modern team site using PnP PowerShell in SharePoint
- In 2 steps convert a classic SharePoint page to modern using PnP
- SharePoint Online: Delete All Files from document library for the given date – PowerShell CSOM
- Create SharePoint online list using PnP provisioning template
- SharePoint Automation: PowerShell script to get remote server information
- Office 365: Retrieve hub sites and associated sites using PnP Powershell
- SharePoint Online Automation – O365 – Upload files to document library using PowerShell CSOM
- SharePoint Online Automation – O365 – Create multiple items in a list using PowerShell CSOM
- SharePoint Online Automation – O365 – Update document library metadata using PowerShell CSOM
- SharePoint Online: List operations using PnP PowerShell
- Set-SPOHomeSite MSDN Article
1 comments on “Setup home site SharePoint: How to set up home site in SharePoint Online using PowerShell?”