STSADM command to show the LISTS within a site RRS feed

  • Question

  • 1) Is there an STSADM command to show the lists for a site or show list & list sizes for a site or site collection?

    2) if not, I'll even entertain powershell if theres a way to do it there?

    Wednesday, October 17, 2012 12:23 AM


All replies

  • Hi,

    Here is powershell script to iterate all lists within a site:

     #Grab all lists in the current web
        $lists = $web.Lists   
        Write-Host "Website"$web.url -ForegroundColor Green 
        if($WriteToFile -eq $true){Add-Content -Path $outputPath -Value "Website $($web.url)"}
            foreach($list in $lists)
                $listcount +=1  
                Write-Host " – "$list.Title          
                if($WriteToFile -eq $true){Add-Content -Path $outputPath -Value " – $($list.Title)"}
        $webcount +=1

    Check this blog for more info: http://sharepointrelated.com/2011/11/28/get-all-sharepoint-lists-by-using-powershell/

    Here you can get total items within a list: http://davidfrette.wordpress.com/2010/03/12/sharepoint-listing-of-all-lists-in-a-site-collection-using-powershell/

    Hope it could help

    Cheers, Hemendra-MCTS "Yesterday is just a memory,Tomorrow we may never see"

    Wednesday, October 17, 2012 12:12 PM
  • Hi,

    Have you resolved you problem? If yes then provide your solution so other can take benefit of that and if above post help you to resolve your problem then mark it as answer.

    Hemendra: "Yesterday is just a memory,Tomorrow we may never see"

    Whenever you see a reply and if you think is helpful, click "Alternate TextVote As Helpful"! And whenever you see a reply being an answer to the question of the thread, click "Alternate TextMark As Answer

    Friday, November 16, 2012 10:13 AM