Finding WebSite Admins and Total List Items

This single line command will export Site Admins and List Item Count for every website in a given WebApplication. Very useful if the boss wants to shell out zero dollars for an auditing system.

 Get-SPWebApplication "<webappURL>" | select -expandproperty Sites |%{Get-SPWeb $_.URL} |%{$g1=($_.Lists | ?{$_.hidden -eq $false} |select ParentWebURL,Title,ItemCount,BaseType) ; $g2=($_.SiteAdministrators |Select -expand "DisplayName"); Add-Content "ReportFile.csv" "$g2,$g1"}

Leave a Reply

Your email address will not be published. Required fields are marked *

Post Navigation