Monday, February 25, 2013

Find the GUIDs of SharePoint 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:
http://sharepoint.com/_layouts/ViewEdit.aspx?List=b6a291e8%2D708d%2D4ad1%2Dbaac%2D6262d37d8941&View=%7B11C32C0E%2D52BA%2D4F7F%2D93D6%2D91CDFA41485E%7D&Source=http%3A%2F%2Fsharepoint%2Ecom%2FDesign%2520Documents%2FForms%2FAllItems%2Easpx

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


Using 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 "http://sharepoint.crescent.com").id
 
#get sharepoint site guid powershell
Write-Host "Site Collection GUID:" (Get-SPSite "http://sharepoint.crescent.com").id 

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

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

#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:"$SiteColumn.id

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



You might also like:
SharePoint Usage Reports
Usage reports, collaboration and audit for SharePoint.
Document SharePoint Farm
Automatically generate SharePoint documentation.
*Sponsored


Check out these SharePoint products:

No comments :

Post a Comment

Please Login and comment to get your questions answered!

You might also like:

Related Posts Plugin for WordPress, Blogger...