Get List ID’s for the Lists available in Site

You can use the below script to get List ID’s in Site.

$snapIn = Get-PSSnapin | where-object {$_.Name -eq “Microsoft.SharePoint.PowerShell”}
if($snapIn -eq $null) {
Add-PsSnapin Microsoft.SharePoint.PowerShell
}
$website = Get-SPWeb -identity http://yoursiteurl
$website | ForEach-Object {
write-host “Checking site:”$_.Title
#Go through each List in the site
$_.Lists | ForEach-Object {
write-host “List:”$_.Title ” – List Id:”$_.Id
$_.Views | ForEach-Object {
write-host “View:”$_.Title ” – View Id:”$_.Id
}
#Dispose of the site object
$website.Dispose()
}
}

Advertisements

Author: "Sharepoint Thoughts"

I’m a Microsoft Certified IT Professional with 5+ Years Experience on SharePoint Technologies. Worked extensively on “SharePoint 2007”, “SharePoint 2010”, “SharePoint 2013” & “SharePoint 2016” on Implementation, Configuration & Troubleshooting several Projects.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s