Migrating SharePoint on a budget is the best option and I would not advice it if one can avoid it. More importantly how does one know when to splash out on a tool? Well an easy way would be to check out our SharePoint Migration Checklist . Not having a tool to migrate a SharePoint farm or complete a checklist requires additional help. Introducing the SharePoint Migration PowerShell Scripts.
There are a few important areas to watch out for when migrating SharePoint to Office 365, or another new version like SharePoint 2016. The GTconsult A Team have made a few SharePoint PowerShell Migrations Scripts to assist. Cleaning up orphans users, listing custom solutions, finding large lists and calculating the size of a SharePoint environment. Enjoy
If you run SharePoint 2010/2013 Management Shell and get the following error: “The local farm is not accessible. Cmdlets with FeatureDependencyId are not registered” check out how to fix it here
SharePoint Migration PowerShell Scripts
Clean-up orphan users
It is best to remove orphan users as they serve no purpose in a migration. We created the SPOrphans.ps1 script to find all the orphan users in a web application. All orphans are listed and removed with a y / n prompt. We found a similar script in multiple places on the web but none worked as advertised. The A Team updated the following to ensure reporting and cleanup completed without failure.
- Automated the scan of the entire farm.
- Turned on in console reporting for a play by play. Run the script with an account that has site collection admin rights to avoid Access Denied errors.
List Custom Solutions
Custom solutions are tricky to migrate, its important to list all solutions, check for compatibility and install them to the new environment before the migration. We found a few of these online and have enhanced SPSolutions.ps1 with the following elements
- Prompt for folder location and WSP elements download
Find Large Lists
SharePoint Online throttles any list above 5000 item. We found SPLargeLists.ps1 which was good but it needed a few enhancements so this is what we did.
- If the account you are using does not have access to the site it would give you the location to resolve the issue
- Update $ErrorActionPreference to SilentlyContinue if you feel the need not to see the duplicate error
Calculate Size of the SharePoint Farm
It’s important to find out how much data their is to migrate as it will provide a ballpark figure on how long it will take to move. We updated SiteCollectionSize.ps1 to bring back all site collections and their total size with a SharePoint Farm for that reason.
Or download all 4 here
The 4 most important SharePoint Migration PowerShell Scripts according to the GTconsult A Team. Please let us know if you think we should add to this list by adding a comment below.