Created
September 22, 2017 18:57
-
-
Save joerodgers/add3c9956ceb625025c9803e4408b3dc to your computer and use it in GitHub Desktop.
Display all lists in a SharePoint 2013+ farm that have >5k items
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Get-SPSite -Limit All | Get-SPWeb -Limit All | ? { -not $_.IsAppWeb } | % { | |
foreach( $list in $_.Lists ) | |
{ | |
if( $list.ItemCount -gt 5000 ) | |
{ | |
[PSCustomObject] @{ | |
WebUrl = $list.ParentWeb.Url | |
List = $list.Title | |
ListUrl = $list.ParentWeb.Site.MakeFullUrl($list.DefaultViewUrl) | |
ItemCount = $list.ItemCount | |
Hidden = $list.Hidden | |
Type = $list.BaseTemplate | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment