SharePoint 2013 Get SharePoint List or Document Library GUIDs using PowerShell

SharePoint 2013 Get SharePoint List or Document Library GUIDs using PowerShell

In this post, we will discuss how to get SharePoint list or document library GUIDs using PowerShell in SharePoint. If you want to get the GUID of a list you can easily get it from the browser or also you can get it by using a PowerShell command.


Also, you may like to read:
Steps to list out All workflows presented in SharePoint 2007 Site Collection and SharePoint 2013

Enable Breadcrumb in SharePoint 2013 or Implement Classic Breadcrumb in SharePoint 2013

SharePoint 2013 Online Content Search WebPart with Query String

To get the GUID of a particular list, Simply open the list settings page using browser and then you will see something like below in the browser.

?List=%7BB13CC473-6187-4478-A0DD-853E83AA6F9D%7D

Here what ever presented after %7B and before %7D is your list GUID. In this particular case the GUID of the list will be: B13CC473-6187-4478-A0DD-853E83AA6F9D

Get All List and Library GUIDs using PowerShell:
Below is the PowerShell command which will give you the Guids of all list and library of the site collection.

Add-PSSnapin “Microsoft.SharePoint.PowerShell”

$site = Get-SPSite http://win-pfcp2dgt8di/sites/EnjoySharePoint/

$web = $site.RootWeb

$lists = $web.lists

$lists | Format-Table title,id -AutoSize

It will looks like below:

SharePoint 2013 Get SharePoint List or Document Library GUIDs using PowerShell
SharePoint 2013 Get SharePoint List or Document Library GUIDs using PowerShell

If you want to find out between generic list and document library then you can put the below command.

Add-PSSnapin “Microsoft.SharePoint.PowerShell”

$site = Get-SPSite http://win-pfcp2dgt8di/sites/EnjoySharePoint/

$web = $site.RootWeb

$lists = $web.lists | Where-Object { $_.BaseType -Eq “GenericList” }

$lists | Format-Table title,id -AutoSize

$libraries = $web.lists | Where-Object { $_.BaseType -Eq “DocumentLibrary” }


$libraries | Format-Table title,id -AutoSize

Hope this will be helpful.


You May Also like the Following SharePoint Online Tutorials:

About Bijay Kumar

I am Bijay from Odisha, India. Currently working in my own venture TSInfo Technologies in Bangalore, India. I am Microsoft Office Servers and Services (SharePoint) MVP (5 times). I works in SharePoint 2016/2013/2010, SharePoint Online Office 365 etc. Check out My MVP Profile.. I also run popular SharePoint web site SharePointSky.com

View all posts by Bijay Kumar →