SP HAMMAD
Menu

SKILLS & TRICKS

Get-SPOSite Issue and Work Around

2/9/2019

0 Comments

 
We all know that Get-SpoSite cmdlet contains more than one parameter set and you may only use parameters from one parameter set and you may not combine parameters from different parameter sets. Moreover, it retrieves and returns properties of all site collections that match the given criteria.

But sometimes you run into weird issues when you are doing the most common things. In this case, one of my friend was cleaning up his demo Office 365 tenant.  To make an overview of all site collections, he ran the following cmdlet:
Cmdlet

    
​This would make a list of all site collections that are available in  Office 365 tenant and export it to a CSV file. When going through it, he noticed that none of the site collections were flagged as a hubsite. This couldn’t possibly be true as  he created many hub sites for testing purposes.

I decided to check this in my own tenant to see if it was a local problem. So let’s see what happens.

Issue

​Running the following PowerShell returns all site collections that contain the word intranet.

    
Picture
So it looks like we do not have any hub sites. However, when I check the exact same thing for 1 of the site collections (which I know for sure is a Hub Site) by running:

    
Picture

Work Around

The current workaround is to get all site collections, and then use a foreach loop to go through them again and get the property.  In my case, I would run:

    
Picture
You can also use the Get-SPOHubSite cmdlet to get all Hub Sites in your tenant.  Here is the result:
Picture
​Hopefully this helps you find your Hub Sites successfully!
0 Comments



Leave a Reply.

    Archives

    February 2020
    January 2020
    December 2019
    November 2019
    October 2019
    September 2019
    August 2019
    May 2019
    April 2019
    March 2019
    February 2019
    January 2019
    December 2018
    November 2018
    October 2018
    July 2018
    June 2018
    May 2018
    April 2018
    March 2018
    November 2017
    October 2017
    April 2017
    March 2017
    February 2017
    January 2017
    November 2016
    July 2016
    December 2014

    Categories

    All
    Agile
    Analysis Of Metrics
    CMS
    DevOps
    Digital Workplace
    Guideline
    Microsoft
    Microsoft Azure
    Microsoft Teams
    Microsoft WPC 2016
    MS Ignite
    Niteco
    Office 365
    Office 365 CDN
    Personalization
    PowerShell
    Project Management
    Scrum
    SharePoint
    SharePoint 2013
    SharePoint 2016
    SharePoint Framework
    Sitecore
    Sitecore 9
    Sitecore Symposium
    Software Project Audit

    RSS Feed

    Picture

Feel free to connect and Subscribe for updates!

SKYPE

hammad.ahmad

Telephone

+62 81316905997

Email

hammad@sphammad.com
  • Home
  • About Me
  • Blog
  • Contact
  • Home
  • About Me
  • Blog
  • Contact