Skip to main content

Posts

Showing posts from July, 2017

PowerShell script to count number of list and library items in a site for SharePoint Online and MOSS 2007

This below script mainly helps to get the site item count for both SharePoint Online and MOSS 2007. This will be useful when you are migrating site from MOSS2007 to SharePoint online. Script requires input csv file which contains list of site url as below Input.CSV SiteUrl http://testsite1.com http://tetsite.com when you execute the script, you need to provide 2 input parameters 'Enter input csv path with file name'   - c:\script\input.csv Enter Output Path- c:\script\outpu.csv Script for SharePoint 2007 #clear the PowerShell window cls   $CsvPath = Read-Host -Prompt 'Enter input csv path with file name'   $ReportPath = Read-Host -Prompt 'Enter Output Path' # Exclude the following libaries / lists $excludeLists = @( "Master Page Gallery" ,                 "User Information List" ,                 "TaxonomyHiddenList" ,                 "Theme Gallery" ,