Find the GUIDs of SharePoint Web Application, Site Collection, Site, List, View and Columns

We may have to find the GUID of SharePoint objects such as web application, site collection, web, list, view or column at times. Here are some nifty techniques:

Get web application GUID in SharePoint 2010
Lets find web application GUID in SharePoint 2010. Go to Central Admin >> System Settings >> Click on "Configure Cross-firewall access zone" link under Farm Management and choose the desired web application and click Ok. Now, we get the web application GUID in address bar!
sharepoint 2010 get web application guid
Get Site Collection GUID from Central Administration:
In central administration, navigate to links such as "Change Site Owner" by going to: Central Admin >> Application Management >> Change Site collection Administrators and Pick the target site collection. Now, you'll get site collection ID in browser address bar, as highlighted.
get sharepoint site guid powershell

Find List GUID from SharePoint User Interface:
Head on to List settings >> Hover over list settings links such as "Column Default Value Settings", watch the status bar, There is your ID! You can copy shortcut to get the GUID of the particular list!
how to get list guid in sharepoint 2010

How to get SharePoint list view GUID:
Go to "Modify View" page, a typical view would look like:

From the above, we've a parameter "View" with value: %7B11C32C0E%2D52BA%2D4F7F%2D93D6%2D91CDFA41485E%7D , use the below decoding technique to get the GUID.

SharePoint GUID Conversion Encoding: just replace:
  • %7B with  {
  • %2D with  -
  • %7D with  }

Using SharePoint Manager tool to get GUID of any SharePoint object:
Just navigate to the target object, such as web application, site collection, site, column, view, etc. and pick the value at "ID" attribute.
get list guid in sharepoint 2010

PowerShell to find GUID of SharePoint Web Application/ Site Collection/Site/List/View/Column:
Now the PowerShell way! How to get list GUID in SharePoint 2010 using PowerShell? Lets use PowerShell to retrieve GUID of web application, Site collection, Site, List and column objects programmatically.
Add-PSSnapin Microsoft.SharePoint.Powershell -ErrorAction SilentlyContinue

#get sharepoint web application guid
Write-Host "Web Application GUID:" (Get-SPWebApplication "").id
#get sharepoint site guid powershell
Write-Host "Site Collection GUID:" (Get-SPSite "").id 

#powershell to get web guid
Write-Host "Site/Web GUID" (Get-SPweb "").id

#how to get list guid in sharepoint 2010 using powershell
$Web = Get-SPWeb ""
#Get the List
$List = $web.Lists["Design Documents"]
Write-Host "List GUID:" $

#find sharepoint list view guid
Write-Host "View Guid:" $List.DefaultView.ID
#write-host $List.Views["All Documents"].ID;

#get guid of site column
$SiteColumn = $web.Fields["Department"]     
Write-host "Site column GUID:"$

#get sharepoint list column guid
$ListCol = $list.Fields["Category"]
Write-host "List column GUID:"$ 

To find the GUID of SharePoint Farm, use: How to Get SharePoint Farm ID using PowerShell?

1 comment:

  1. Your eye's are definitely keen in identify those tricks. Excellent !


Please Login and comment to get your questions answered!

Powered by Blogger.