A PowerShell script that loop through a site collection and list down all the list title in excel format
Add-PSSnapin Microsoft.Sharepoint.Powershell
$site = Get-SPSite "SiteURL"
$sitelists = foreach ($web in $site.AllWebs) {
foreach($list in $web.lists){ $list }}
$sitelists |select Title | Export-CSV C:\liststitles.csv
Remove-PsSnapin Microsoft.SharePoint.PowerShell
Add-PSSnapin Microsoft.Sharepoint.Powershell
$site = Get-SPSite "SiteURL"
$sitelists = foreach ($web in $site.AllWebs) {
foreach($list in $web.lists){ $list }}
$sitelists |select Title | Export-CSV C:\liststitles.csv
Remove-PsSnapin Microsoft.SharePoint.PowerShell
No comments:
Post a Comment