Background image

Build an inventory before a SharePoint Migration and put it in Visio

default post thumbnails default post thumbnails

You have all the information you need before migrating to the latest and greatest in SharePoint. You know what the supported scenarios are for migrating either to SharePoint 2013 or to Office 365 and read all about it. In fact, you’ve gone as far as evaluating whether it’s right for you or not and now, you’re ready to take action. Problem is, where do you start? SharePoint is vast, it’s a platform, so how do you take it and start the migration? In every single article I have ever written on Migration of SharePoint and it doesn’t matter which version you are going to, to be honest. I have said the same thing over and over again; gather an Inventory of your environment before doing anything else! But I have never really shown you how…

Why should I build an inventory before a SharePoint Migration?

I recommend you first read my articles on SharePoint 2013 Migration: Supported Upgrade Paths and the planning that goes around it, of course, this is just as valid for an Office 365 migration. The reason why I suggest building such an inventory of your SharePoint is because I have used a strategy that has worked for me time and time again. I named this strategy the RMR strategy, and it refers to Remove, Migrate or Rebuild. I won’t go over this strategy again in this article but as the name suggests it aims at identifying what you plan on Removing, Migrating or Rebuilding before you head to the destination or your migration to a new SharePoint in other words. But to be able to do this of course, you’ll need to know what you have. If you have a well-organized inventory, you will accelerate your SharePoint Migration immensely. And without using any tools, you’ll be able to build a simple to use inventory using PowerShell and Visio for anyone in your team to use. Keep an open mind, as what I will show you can obviously be exploited even further to pull the information you might need for yourself. Don’t get carried away either, it’s good to keep things simple in everything we do and this includes the inventory.

Export your SharePoint Inventory with PowerShell

I definitely cannot take the credit for this, that honor goes to Adam Preston from TCSC. Through one of his blog posts, he showed me it was possible to easily export information from my web applications and site collections and have it sent to Visio to build a Diagram. 

First, we’ll need to export our SharePoint information using PowerShell. But to do this we need to understand what we’re doing. It’s an easy enough language to understand even if you are not an IT Pro or Dev. Don’t worry, even if you are not comfortable with it, you will be able to copy paste it but I will do my best to try and explain it.

The Final Result:

Get-SPWebApplication | Get-SPSite -Limit All | Get-SPWeb -Limit All | Select Title, URL, ID, ParentWebID | Export-CSV C:sharepointinventory.csv -NoTypeInformation

But that information is useless if you do not understand it.

I start with a Get-SPWebApplication to choose the Web Application I want to build this for. The vertical line you see is called a pipeline and allows me to take the results from the first command in which I gathered my Web Application and ask it to give me all the Site Collections within it using Get-SPSite. Of course I don’t want it to end there so I asked for all the Sites within these Site Collections using a pipeline and Get-SPWeb.

Wait, what about the Select Title, URL, ID, ParentWebID? These are actually properties of my SPWeb or “Sites” returned in my query. I need them to export them into Excel or CSV and get more out of my SharePoint Inventory.

How did I know which properties to use?

I knew I needed a unique identifier for each site and for their parent site, it’s important for me otherwise I wouldn’t be able to tell which site is under which site other than trying to guess from the URL. So I did something with PowerShell that would give me all the available properties.

Hint: You can add as many other properties as you want to build your inventory.

Get-SPWebApplication http://demo/ | Get-SPSite -limit all

| get-SPWeb -limit all | get-member -membertype property

Inventory before SharePoint Migration

This way you can get all the properties you like to build an inventory that makes sense for you. Let’s put all of this into Excel using the Export-CSV to see what it looks like.

Inventory before SharePoint Migration

WOW! I have the list of all my sites with their URL, the template they were created with as well as the date they were created! Awesome! The ID and the ParentWebID will be extremely useful to me to build this hierarchy. But first, I will need to tweak it myself a little bit. See, in a Web Application, Site Collections are all independent. But I want my Visio Diagram to show an inventory of my Web Application as if these Site Collections were all linked under it. For this, replace the Root Site Collections that have 00000-00000-000-000-000000 with the ParentWebID of the root of the main Site Collection you want to use as a parent for all.

Hint: Think of all the possibilities you have here to build an inventory with the properties you like. You could have also listed the properties of your Site Collections only and not include Sites within to build an inventory of Site Collections only.

Before we move on, make sure you save this as an XSLX File so that we may use it in Visio. 

Integrate your SharePoint Inventory into Visio

Though I will be using Visio 2013, this can also be done with Office Visio 2010, the steps are almost identical but some of the options may be called differently. 

Start by launching the Organization Chart Wizard

Inventory before SharePoint Migration

You’ll then be asked whether the information is already stored in a file or database, this is true in our case.

Inventory before SharePoint Migration

Then specify where your content lives, here we will select Excel.

Inventory before SharePoint Migration

Locate your XLSX file and click on Next. Since we are cheating and using the Organization chart builder in Visio to build an Inventory before our SharePoint Migration we have to run with it. Meaning, we will have to specify the Name and whom it reports to in the wizard even though we are using it with SharePoint Sites.

Inventory before SharePoint Migration

And specify which columns will be displayed in your chart.

Inventory before SharePoint Migration

Follow through the next few screens and specify what you want in you case based on your business needs. Here is the result I got:

Inventory before SharePoint Migration

Again all the credit for this should really go to Adam Preston who’s given me the idea in the first place in using Visio to show our inventory.

Adam Preston

Adam Preston is a good friend working at TCSC, a Microsoft Partner based out of Richmond, VA.

Exploit your SharePoint Inventory the way you like

The exported Excel from our little PowerShell line is where the key lies in building our Inventory before migration. Make sure to explore the properties and add whatever you want to see. Also, nobody said you HAD to use Visio. You can either leave it in  Excel and use the graphs or formulas there or bring it to Access or any other program for that matter which helps you see the inventory better.

Always do this before a SharePoint Migration

As you can see the effort is minimal, run the few PowerShell lines I mentioned above, import it to Visio and by all means extend it to fit your organization. The key takeaway from this article is to make sure to build an inventory before your SharePoint migration. If you do plan to migrate to SharePoint 2013 or  Office 365, having this inventory will help you get organized and plan accordingly what you will need to bring over. I’ll tell you a secret, I have traveled quite a bit and seen many SharePoint implementations, you are not the only one with a chaotic SharePoint. Take control and own the migration of your SharePoint to whatever next version you choose to go to. Build a solid inventory, identify what can be easily migrated, removed or needs to be rebuilt. I assure you this will reduce the time it will take you to migrate and make you ready for any next steps like building a SharePoint Governance Plan.

For more resources on preparing a SharePoint migration you can read:

Recommended by our team

What did you think of this article?

Live Webinar Join us on February 22 for the unveiling of the new ShareGate experience.