Monday, 16 August 2010

Using PowerShell to retrieve SharePoint site column guids

Problem: I am creating a Content Type that uses 1 of the built in site columns (field column), I need the guid of a OOTB site column.  I am looking to use the OOTB "Append-Only Comments" site column.
Resolution: Open PowerShell and execute the cmd:
$web = Get-SPweb http://demo1
write-host $web.Fields["Append-Only Comments"].Id

Tip: Don't add xml comments into declaritive content type creation, it stops the activation without any warning. 


Post a Comment