Posts

Showing posts from November, 2013

SharePoint 2007 - Content Audit: Print last modified & ownership of all sites

If you are planning to migrate from SharePoint 2007 to 2010 or to 2013, then first thing you should do is to audit your content to determine what’s being used & thus should be migrated.
I wrote the below script to determine the site collections modified recently & their site owners. I started with “LastModifiedDate” property of SPWeb object but quickly realised that search crawler updates this property every time a crawl takes place. Thus the solution is to go through each list within the site collection & get the most recent modified date. This gives us more accurate figure we can present to business owners.

[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint") [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint.Publishing") # Get the last updated date for a site collection # Iterate through all webs & all lists of the site collection and returns the most recent updated date function getLastestChangeDate([…