Get Started with SharePoint Hub Sites (Part 02-CLI)

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]

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]

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.

  • Consistent Look and Feel

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.

  • Scoped Enterprise Search

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.

  • Site activities

User activities happens within the associated sites which means, the engagements are specific to an defined area.

  • Content Aggregation

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.

  1. Create a New site collection and set it as the Hub site
  2. 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.

1

And here’s the first line to connect to the SharePoint online service.

Connect-SPOService -Url https://tenantname-admin.sharepoint.com

2

Provide your Admin credentials and hit next.

3

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"

4

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

5

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

6

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

7

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

8

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

9

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.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s