Translate

Tuesday, February 10, 2015

To find all the large lists with items count - PowerShell


I have seen many times you have the immediate requirement of getting the large list for any or all the web apps in your SharePoint farm.

Please run this PowerShell for each content database - Best practice is off production hours 

Use wss_content_relatedDBName

SELECT ItemChildCount + FolderChildCount as Items, DirName +'/' + LeafName as RelativePath FROM alldocs WITH(NOLOCK) WHERE ItemChildCount + FolderChildCount > 5000 ORDER BY Items DESC

Thank you!

No comments:

Post a Comment