Monday, 10 October 2016

PowerShell script to get updated content in whole site between two dates.


Introduction:

As a part of migration of SharePoint site from 2010 to 2013 environment, I need to perform a content migration from 2010 to 2013. As a migration process, content database of 2010 production site was migrated to 2013 environment. Yet the 2010 production site was in use and 2013 site is still doing setups and updates for live production. In this mean time, 2010 site has many content updates going on obviously as site is being used by a giant company. So how to get the contents of site which is updated after content DB backup is taken from 2010?

Solution:

I have prepared two scripts.
  1. First script will read for the Site URL, Start Date and End Date from user and give whole inverntory count of lists/libraries/sites which are updated between two dates. And it will give the csv file with no of items for each object which are update between 2 dates.
  2. This script will read for the Site URL, Start Date and End Date from user and give all items which are updated between two dates from whole site collection. This will also give the csv file with Site URL, List name and, Item URL for each item which are update between 2 dates. 

Thus, I was able to get all the items which are updated after content DB is migrated to 2013 site and updated those items manually.

In addition, we can use this script multiple times till the 2013 site actually goes live and can have up to date content on new live site!!

Thanks for reading this blog !





No comments:

Post a Comment