SIGN UP MEMBER LOGIN:    
ARTICLE

Enable Enterprise keywords in SharePoint 2010 using powershell

Posted by Vijai Anand Articles | SharePoint June 03, 2011
In this article we will be seeing how to enable Enterprise keywords for a list using powershell script.
Reader Level:

Introduction: 

Enterprise keywords are used to tag the documents when uploading the documents in the document library. Enterprise documents can be enabled in both SharePoint lists and libraries. Enterprise keywords - Terms are stored in a non-hierarchical way and available for users to key in which is known as folksonomy (free tagging). In this article we will be seeing how to enable Enterprise keywords for a list using powershell script.

Prerequisites:
  1. Managed metadata service application should be configured. 

  2. Web application should be associated to the Managed Metadata Service Application.
Enable Enterprise Keywords using powershell

To enable Enterprise keywords through UI refer http://www.c-sharpcorner.com/UploadFile/anavijai/7633.

To enable enterprise keywords using powershell do the following steps:
  • Go to Start => All Programs => Microsoft SharePoint 2010 products => SharePoint 2010 Management Shell. 

  • Run as an administrator. 

  • Run the following script.

    $site = Get-SPSite "http://serverName:22222/sites/Test/"
    $web = $site.OpenWeb("BL")             
    $list = $web.Lists.TryGetList("dl");
    if ($list -ne $null)
    {
      $field = $list.ParentWeb.AvailableFields["Enterprise Keywords"]
      if ($list.Fields.ContainsField("Enterprise Keywords") -eq $false)
      {
        $list.Fields.Add($field)
        $list.Update()
        write-host $field.Title " added successfully to the list"
      }
      else
      {
        write-host $field.Title  " column already exists in the list"
      }
    }
    else
    {
       write-host $list.Title  " does not exists in the site"
    }

  • Go to the =>Permissions and Management => Enterprise Metadata and Keywords Settings.

  • You could see the "Enterprise Keywords" enabled.
Enterprisekeywords1.jpg
 

Login to add your contents and source code to this article
share this article :
post comment
 
6 Months Free & No Setup Fees ASP.NET Hosting!
Become a Sponsor
PREMIUM SPONSORS
  • ceTE software specializes in components for dynamic PDF generation and manipulation. The DynamicPDF™ product line allows you to dynamically generate PDF documents, merge PDF documents and new content to existing PDF documents from within your applications.
    Get 2 Months Free of ASP.NET Hosting for Only $4.95/month! Receive FREE MS SQL and MySQL Databases Including ASP.NET 4/3.5, MVC 3.0, Silverlight 4, Windows 2008/IIS 7.0 Plus FREE IIS 7 Modules. Host UNLIMITED ASP.NET Web Sites - Click Here!
Nevron Gauge for SharePoint
Become a Sponsor