SharePoint Online Hub sites were announced at Ignite 2017. They are getting rolled out to Targeted Release Tenants during the week of March 21 2018. As of today, the UI elements (setup and navigation, for example) aren’t there yet, but we can start testing and experimenting with some other elements like news rollups and theming. This article will describe how to get it working.
NOTE: I am working in a demo tenant with Targeted Release available to all users.
- Install the SharePoint Management Shell – 64-bit version. If you have an older version installed, you’ll need to uninstall and re-install. (Please Microsoft fix this.) The version I ended up with is 16.0.7414.1200.
- I am using Visual Studio Code, but you can use the SPO Management Shell directly.
- I’m guessing you need to be in the SharePoint Administrator role at least. My tests were done using the Global Admin accounts.
Create Hub Site and one or more Associated Sites
The first thing you’ll want to do is either identify a hub site or create a new one. It doesn’t matter if it’s a Team or a Communication site; both should work. Then create another site that will become associated to the hub site. My hub is an HR Portal Communication site, and the associated site is the HR Benefits Team site. The URLs are, respectively:
As the screenshots below show, I also added two news posts to the Portal site, and a single news post to the Benefits site.
Launch your PowerShell environment. I use a line to grab my admin credential and then I connect to the tenant’s admin site.
$admin = Get-Credential -UserName "email@example.com" Connect-SPOService -url https://tenant-admin.sharepoint.com -Credential $admin
From here, it’s easy to register your hub site and add associated sites to it:
You should end up with something like this:
ID : 12a0026a-c8a5-4d5d-b7af-66b3b01849bd Title : HR Portal SiteId : 12a0026a-c8a5-4d5d-b7af-66b3b01849bd SiteUrl : https://tenant.sharepoint.com/sites/HR-Portal LogoUrl : Description : Permissions :
Refreshing the HR-Portal site didn’t result in any visible changes.
Now, back in PowerShell, add the HR Benefits site as an associated site to the hub site:
Add-SPOHubSiteAssociation https://tenant.sharepoint.com/sites/HR-Benefits -HubSite https://tenant.sharepoint.com/sites/HR-Portal
In my earlier tests, my news post from an associated site rolled up to the hub site!
This is a fresh test from earlier today. It’s been a bit over an hour since I’ve run the scripts this time and the news hasn’t rolled up yet. I had also changed the hub theme to ensure it gets pushed down to the associated sites. I still don’t see it reflected yet, but I will update this post when that does happen.
I may play around with the only other cmdlet I found which is Unregister-SPOHubSite.
UPDATE: News Rollup
After a SharePoint Hub Site AMA, one of the comments suggested that I have to add the News web part again. Sure enough, once that happened, the news rolled up from the Benefits site.
April 2 2018 Update
In my test today, the Team site that I had created on March 28 (but only registered as a hub site today) rolled up the news posts from my two associated sites without my having to add the News web part.
UPDATE: Theme Refresh
I did un-register the hub site, set a new theme, and then re-register to for a theme change for the associated site. I don’t think we have to do this if we do change themes at the hub, but this is something to keep an eye on.
April 2 2018 Update
I created a new hub and associated two sites to it. I then change the theme on the hub. The two associated sites eventually had their themes refreshed to match the hub. The delay was different on the two associated sites, with the second site getting the theme refresh within about 15 minutes or so.
UPDATE: Hub Navigation
April 2 2018 – The navigation elements are now lighting up immediately as soon as I register the hub site. Still waiting to see my two associate sites automatically added to the hub navigation. After about 30 minutes, I only see a link to the hub site itself.