This is the part 02 of this article series. If you prefer to do this from the Admin Center, refer to my previous article here
Hub Sites in SharePoint Online is the new way of organizing your sites. Now what does that mean?
![docking_thumb[5] docking_thumb[5]](https://manojviduranga.files.wordpress.com/2019/04/docking_thumb5_thumb.jpg?w=496&h=279)
Based on the size of an organization, SharePoint admins create multiple sub sites to classify and organize content which usually aligns with the organization hierarchy (Department wise). There can be Team Sites and communication sites and yet, Hub sites can consist both these under one umbrella to help you relate them together based on any attribute such as Projects, Departments, Division, Region or whatever you have.
Let me put it in a simple way – Hub Sites will now help you to associate team sites and communication sites to provide a common navigational hierarchy, search, Logos and look and feel.
Hub sites allows you to standardize the site hierarchy. More importantly, it brings the consistency across all sites. Following are some of the characteristics of Hub Sites Capability:
![Hub Sites[31203]_thumb[2] Hub Sites[31203]_thumb[2]](https://manojviduranga.files.wordpress.com/2019/04/hub-sites31203_thumb2_thumb.jpg?w=727&h=549)
Some of the Hub Site characteristics are:
- A Common Top Navigation (Global Navigation)
A common global navigation is maintained across all connected sites of the particular Hub site.
Sub sites inherits their look and feel from the root (Hub site) which allows you to maintain a single branding across all your sites. In a simple term, all sites are associated, which means they resides under one Hub.
Search acts relevantly here. When you search for something in a Hub site, it performs the search within all the sites of that particular Hub Site.
User activities happens within the associated sites which means, the engagements are specific to an defined area.
Automatically aggregates content and displaying from multiple sites. News Web Part, Sites Web Part and Content Web Part can be used in a Hub Site to aggregate content from the associated sites and display the content on the Hub Site’s home page. This reduces a lot of manual work that developers supposed to do to get this done in the earlier days.
Provisioning a Hub Site:
There are two ways you can create hub sites in SharePoint online (Yes ! for now its only supported in SharePoint online). However, there is no template to create a Hub site so you can’t simply create a one using the “New Site” option. Instead, these are the options you have.
- Create a New site collection and set it as the Hub site
- or Promote an existing site as the Hub Site and associate other site collections to it.
A SharePoint Team Site or an Communication Site can be converted in to a Hub Site. Ensure you have the “SharePoint Administrator privilege or above” in Office 365 to perform these changes.
First and foremost, you need the latest SharePoint Management Shell installed in your machine. Get it here. If you have it installed already, you better uninstall it and install the latest version.
Once installed, launch the Shell as an administrator.

And here’s the first line to connect to the SharePoint online service.
Connect-SPOService -Url https://tenantname-admin.sharepoint.com

Provide your Admin credentials and hit next.

And now to create a new site to act as our Hub. Following is the PowerShell code to provision a new site with modern experience. Adjust the parameters to reflect your localizations.
New-SPOSite -Url https://tenantname.sharepoint.com/sites/HRM -Owner admin@mantoso.onmicrosoft.com -Template "SITEPAGEPUBLISHING#0" -StorageQuota 1024 -Title "HR Management"

Now let’s head on to SharePoint Admin Center –> Active Sites –> and notice the new site just provisioned

Register-SPOHubSite -Site https://tenantname.sharepoint.com/sites/HRM -Principals $null

If the command was successful, you will see that the Hub Site has affected with the change.

Add-SPOHubSiteAssociation https://tenantname.sharepoint.com/sites/CoreHR -HubSite https://tenantname.sharepoint.com/sites/HRM

Head back to the Active sites and you will find that the site now has the association with Hub Site.

The rest would be similar to the things we did in the previous article.
And, the following code can be used to control the permission of “who can associate their site with hub sites”
Grant-SPOHubSiteRights -Identity https://tenantname.sharepoint.com/sites/HMR -Principals admin@mantoso.onmicrosoft.com -Rights Joins
DISCLAIMER NOTE: This is an enthusiast post and is not sponsored by Microsoft or any other vendor.