Tuesday, 4 December 2012

Troubleshooting SharePoint Quick Tip with the Logs

Troubleshooting SharePoint Quick Tip with the Logs

I just discovered a little trick for easing the process of reading and reviewing the SharePoint logs, so I thought I’d share.
Open a SharePoint log and you get an incredibly large file with so much info, especially if your logging is set to verbose. As I develop and I receive generic errors, I need to go into these aggravatingly large logs to find my real issue. Most cases it is easy enough to open it in Notepad++, search for the error and go from there.
I figured out this trick when troubleshooting a web part. I get a typical SharePoint generic error when trying to add it to a page. I find the error in the logs, and it’s just as generic there as well. Now I want to see the entire log history for adding the solution, activating the feature, and adding the web part to a page. I hope to find an error on solution install or feature activation.
So all I want to see is a small window of the log, not the entire thing. I could track my start time by staring at the server clock when I press Deploy and Activate, but even 10 seconds off can add dozens of lines in the logs.
What to do… let’s create a fresh new log for my activity.
Right before I’m about to perform my steps I want to monitor, I restart the SharePoint 2010 Tracing service. (go to Start > Administrative Tools > Services)

By restarting the service, this will create a new log file with the current date and time stamp. Now I walk through my process, recreate the error, and restart the service again. A new log file is created, and the previous one has that small window of time in it! Now I take this and I can comfortably read it, knowing I’m not reading more than I need. Sure enough, I found an assembly reference error on solution deployment.

Creating a new Service Application Proxy Group in SharePoint 2010

Creating a new Service Application Proxy Group in SharePoint 2010

As you create and manage service applications in your farm, you may decide to create additional services for different web applications. In my case, it was rather simple. I wanted a web application that didn’t use FAST, just the basic search functionality. This was on my development workstation and I wanted to keep some of the flexibility of being able to support customers on either version of search. Anyway, I created a new service application for basic search.
I went to manage my web application and clicked Service Connections, and saw that I could only select default or custom. For this single case, custom would be fine and I could just check off all of the services I wanted. I then thought larger scale, with a farm with several web applications on it, wanting to manage unique and separate services for the bunch.
There is no interface in Central Admin to create and manage additional service application groups. So a quick search online revealed Brian Cartmel’s article “Create a new Service Application Proxy Group with New-SPServiceApplicationProxyGroup”. I suggest reading it. I took his scriptlets and made me a script which created an entirely new group and assigned all of the services I wanted. See below.
New-SPServiceApplicationProxyGroup "SERVICEGROUP"

$serviceAppProxy = Get-SPServiceApplicationProxy | where { $_.Name -eq "Access Service" }
Add-SPServiceApplicationProxyGroupMember "SERVICEGROUP" -Member $serviceAppProxy

$serviceAppProxy = Get-SPServiceApplicationProxy | where { $_.Name -eq "Business Data Connectivity Service" }
Add-SPServiceApplicationProxyGroupMember "SERVICEGROUP" -Member $serviceAppProxy

$serviceAppProxy = Get-SPServiceApplicationProxy | where { $_.Name -eq "Excel Services" }
Add-SPServiceApplicationProxyGroupMember "SERVICEGROUP" -Member $serviceAppProxy

$serviceAppProxy = Get-SPServiceApplicationProxy | where { $_.Name -eq "Managed Metadata" }
Add-SPServiceApplicationProxyGroupMember "SERVICEGROUP" -Member $serviceAppProxy

$serviceAppProxy = Get-SPServiceApplicationProxy | where { $_.Name -eq "PerformancePoint Service" }
Add-SPServiceApplicationProxyGroupMember "SERVICEGROUP" -Member $serviceAppProxy

$serviceAppProxy = Get-SPServiceApplicationProxy | where { $_.Name -eq "Basic Search Service Application" }
Add-SPServiceApplicationProxyGroupMember "SERVICEGROUP" -Member $serviceAppProxy

$serviceAppProxy = Get-SPServiceApplicationProxy | where { $_.Name -eq "Secure Store" }
Add-SPServiceApplicationProxyGroupMember "SERVICEGROUP" -Member $serviceAppProxy

$serviceAppProxy = Get-SPServiceApplicationProxy | where { $_.Name -eq "WSS_UsageApplication" }
Add-SPServiceApplicationProxyGroupMember "SERVICEGROUP" -Member $serviceAppProxy

$serviceAppProxy = Get-SPServiceApplicationProxy | where { $_.Name -eq "UserProfileService" }
Add-SPServiceApplicationProxyGroupMember "SERVICEGROUP" -Member $serviceAppProxy

$serviceAppProxy = Get-SPServiceApplicationProxy | where { $_.Name -eq "Connection to Visio Graphics Service" }
Add-SPServiceApplicationProxyGroupMember "SERVICEGROUP" -Member $serviceAppProxy

$serviceAppProxy = Get-SPServiceApplicationProxy | where { $_.Name -eq "Web Analytics Service Application 1" }
Add-SPServiceApplicationProxyGroupMember "SERVICEGROUP" -Member $serviceAppProxy

$serviceAppProxy = Get-SPServiceApplicationProxy | where { $_.Name -eq "Word Automation" }
Add-SPServiceApplicationProxyGroupMember "SERVICEGROUP" -Member $serviceAppProxy
To use this:
  • Open Notepad and copy the contents.
  • Find and replace SERVICEGROUP with your desired group name, in my case it was NotFAST.
  • Go to Central Admin > Manage Service Applications and walk through and specify the service applications you want to include.
  • Save the file as CreateServiceAppGroup.ps1.
  • Open SharePoint PowerShell (Start > All Programs > Microsoft SharePoint 2010 Products > SharePoint Management Shell)
  • Navigate to where you file lives and enter .\CreateServiceAppGroup.ps1
  • Go to Central Admin > Manage Web Applications.
  • Click your web application and click Service Connections.
  • You will now see your new group listed.

Country List for Field Defs in SharePoint

Country List for Field Defs in SharePoint

Below is a country list for use in a field definition for SharePoint. Enjoy!
    <CHOICES>
      <CHOICE>Afghanistan</CHOICE>
      <CHOICE>Algeria</CHOICE>
      <CHOICE>Andorra</CHOICE>
      <CHOICE>Angola</CHOICE>
      <CHOICE>Antigua and Barbuda</CHOICE>
      <CHOICE>Argentina</CHOICE>
      <CHOICE>Armenia</CHOICE>
      <CHOICE>Australia</CHOICE>
      <CHOICE>Austria</CHOICE>
      <CHOICE>Azerbaijan</CHOICE>
      <CHOICE>Bahamas, The</CHOICE>
      <CHOICE>Bahrain</CHOICE>
      <CHOICE>Bangladesh</CHOICE>
      <CHOICE>Barbados</CHOICE>
      <CHOICE>Belarus</CHOICE>
      <CHOICE>Belgium</CHOICE>
      <CHOICE>Belize</CHOICE>
      <CHOICE>Benin</CHOICE>
      <CHOICE>Bhutan</CHOICE>
      <CHOICE>Bolivia</CHOICE>
      <CHOICE>Bosnia and Herzegovina</CHOICE>
      <CHOICE>Botswana</CHOICE>
      <CHOICE>Brazil</CHOICE>
      <CHOICE>Brunei</CHOICE>
      <CHOICE>Bulgaria</CHOICE>
      <CHOICE>Burkina Faso</CHOICE>
      <CHOICE>Burma</CHOICE>
      <CHOICE>Burundi</CHOICE>
      <CHOICE>Cambodia</CHOICE>
      <CHOICE>Cameroon</CHOICE>
      <CHOICE>Canada </CHOICE>
      <CHOICE>Cape Verde </CHOICE>
      <CHOICE>Central African Republic</CHOICE>
      <CHOICE>Chad </CHOICE>
      <CHOICE>Chile </CHOICE>
      <CHOICE>China </CHOICE>
      <CHOICE>Colombia </CHOICE>
      <CHOICE>Comoros </CHOICE>
      <CHOICE>Congo (Brazzaville)</CHOICE>
      <CHOICE>Congo (Kinshasa) </CHOICE>
      <CHOICE>Costa Rica </CHOICE>
      <CHOICE>Cote d'Ivoire </CHOICE>
      <CHOICE>Croatia </CHOICE>
      <CHOICE>Cuba </CHOICE>
      <CHOICE>Cyprus </CHOICE>
      <CHOICE>Czech Republic</CHOICE>
      <CHOICE>Denmark </CHOICE>
      <CHOICE>Djibouti </CHOICE>
      <CHOICE>Dominica </CHOICE>
      <CHOICE>Dominican Republic</CHOICE>
      <CHOICE>East Timor</CHOICE>
      <CHOICE>Ecuador </CHOICE>
      <CHOICE>Egypt </CHOICE>
      <CHOICE>El Salvador </CHOICE>
      <CHOICE>Equatorial Guinea </CHOICE>
      <CHOICE>Eritrea </CHOICE>
      <CHOICE>Estonia </CHOICE>
      <CHOICE>Ethiopia</CHOICE>
      <CHOICE>Fiji </CHOICE>
      <CHOICE>Finland</CHOICE>
      <CHOICE>France</CHOICE>
      <CHOICE>Gabon</CHOICE>
      <CHOICE>Gambia, The</CHOICE>
      <CHOICE>Georgia</CHOICE>
      <CHOICE>Germany</CHOICE>
      <CHOICE>Ghana</CHOICE>
      <CHOICE>Greece</CHOICE>
      <CHOICE>Grenada</CHOICE>
      <CHOICE>Guatemala</CHOICE>
      <CHOICE>Guinea</CHOICE>
      <CHOICE>Guinea-Bissau</CHOICE>
      <CHOICE>Guyana</CHOICE>
      <CHOICE>Haiti</CHOICE>
      <CHOICE>Holy See</CHOICE>
      <CHOICE>Honduras</CHOICE>
      <CHOICE>Hong Kong</CHOICE>
      <CHOICE>Hungary</CHOICE>
      <CHOICE>Iceland</CHOICE>
      <CHOICE>India</CHOICE>
      <CHOICE>Indonesia</CHOICE>
      <CHOICE>Iran</CHOICE>
      <CHOICE>Iraq</CHOICE>
      <CHOICE>Ireland</CHOICE>
      <CHOICE>Israel</CHOICE>
      <CHOICE>Italy</CHOICE>
      <CHOICE>Jamaica</CHOICE>
      <CHOICE>Japan</CHOICE>
      <CHOICE>Jordan</CHOICE>
      <CHOICE>Kazakhstan</CHOICE>
      <CHOICE>Kenya </CHOICE>
      <CHOICE>Kiribati</CHOICE>
      <CHOICE>Korea, North</CHOICE>
      <CHOICE>Korea, South</CHOICE>
      <CHOICE>Kosovo</CHOICE>
      <CHOICE>Kuwait</CHOICE>
      <CHOICE>Kyrgyzstan</CHOICE>
      <CHOICE>Laos</CHOICE>
      <CHOICE>Latvia</CHOICE>
      <CHOICE>Lebanon</CHOICE>
      <CHOICE>Lesotho</CHOICE>
      <CHOICE>Liberia</CHOICE>
      <CHOICE>Libya</CHOICE>
      <CHOICE>Liechtenstein</CHOICE>
      <CHOICE>Lithuania</CHOICE>
      <CHOICE>Luxembourg</CHOICE>
      <CHOICE>Macau</CHOICE>
      <CHOICE>Macedonia</CHOICE>
      <CHOICE>Madagascar</CHOICE>
      <CHOICE>Malawi</CHOICE>
      <CHOICE>Malaysia</CHOICE>
      <CHOICE>Maldives</CHOICE>
      <CHOICE>Mali</CHOICE>
      <CHOICE>Malta</CHOICE>
      <CHOICE>Marshall Islands</CHOICE>
      <CHOICE>Mauritania</CHOICE>
      <CHOICE>Mauritius</CHOICE>
      <CHOICE>Mexico</CHOICE>
      <CHOICE>Micronesia</CHOICE>
      <CHOICE>Moldova</CHOICE>
      <CHOICE>Monaco</CHOICE>
      <CHOICE>Mongolia</CHOICE>
      <CHOICE>Montenegro</CHOICE>
      <CHOICE>Morocco</CHOICE>
      <CHOICE>Mozambique</CHOICE>
      <CHOICE>Namibia</CHOICE>
      <CHOICE>Nauru</CHOICE>
      <CHOICE>Nepal</CHOICE>
      <CHOICE>Netherlands</CHOICE>
      <CHOICE>Netherlands Antilles</CHOICE>
      <CHOICE>New Zealand</CHOICE>
      <CHOICE>Nicaragua</CHOICE>
      <CHOICE>Niger</CHOICE>
      <CHOICE>Nigeria</CHOICE>
      <CHOICE>North Korea</CHOICE>
      <CHOICE>Norway</CHOICE>
      <CHOICE>Oman</CHOICE>
      <CHOICE>Pakistan</CHOICE>
      <CHOICE>Palau</CHOICE>
      <CHOICE>Palestinian Territories</CHOICE>
      <CHOICE>Panama</CHOICE>
      <CHOICE>Papua New Guinea</CHOICE>
      <CHOICE>Paraguay</CHOICE>
      <CHOICE>Peru</CHOICE>
      <CHOICE>Philippines</CHOICE>
      <CHOICE>Poland</CHOICE>
      <CHOICE>Portugal</CHOICE>
      <CHOICE>Qatar</CHOICE>
      <CHOICE>Romania</CHOICE>
      <CHOICE>Russia</CHOICE>
      <CHOICE>Rwanda</CHOICE>
      <CHOICE>Saint Kitts and Nevis</CHOICE>
      <CHOICE>Saint Lucia</CHOICE>
      <CHOICE>Saint Vincent and the Grenadines</CHOICE>
      <CHOICE>Samoa</CHOICE>
      <CHOICE>San Marino</CHOICE>
      <CHOICE>Sao Tome and Principe</CHOICE>
      <CHOICE>Saudi Arabia</CHOICE>
      <CHOICE>Senegal</CHOICE>
      <CHOICE>Serbia</CHOICE>
      <CHOICE>Seychelles</CHOICE>
      <CHOICE>Sierra Leone</CHOICE>
      <CHOICE>Singapore</CHOICE>
      <CHOICE>Slovakia</CHOICE>
      <CHOICE>Slovenia</CHOICE>
      <CHOICE>Solomon Islands</CHOICE>
      <CHOICE>Somalia</CHOICE>
      <CHOICE>South Africa</CHOICE>
      <CHOICE>South Korea</CHOICE>
      <CHOICE>Spain</CHOICE>
      <CHOICE>Sri Lanka</CHOICE>
      <CHOICE>Sudan</CHOICE>
      <CHOICE>Suriname</CHOICE>
      <CHOICE>Swaziland</CHOICE>
      <CHOICE>Sweden</CHOICE>
      <CHOICE>Switzerland</CHOICE>
      <CHOICE>Syria</CHOICE>
      <CHOICE>Taiwan</CHOICE>
      <CHOICE>Tajikistan</CHOICE>
      <CHOICE>Tanzania</CHOICE>
      <CHOICE>Thailand</CHOICE>
      <CHOICE>Timor-Leste</CHOICE>
      <CHOICE>Togo</CHOICE>
      <CHOICE>Tonga</CHOICE>
      <CHOICE>Trinidad and Tobago</CHOICE>
      <CHOICE>Tunisia</CHOICE>
      <CHOICE>Turkey</CHOICE>
      <CHOICE>Turkmenistan</CHOICE>
      <CHOICE>Tuvalu</CHOICE>
      <CHOICE>Uganda</CHOICE>
      <CHOICE>Ukraine</CHOICE>
      <CHOICE>United Arab Emirates</CHOICE>
      <CHOICE>United Kingdom</CHOICE>
      <CHOICE>United States</CHOICE>
      <CHOICE>Uruguay</CHOICE>
      <CHOICE>Uzbekistan</CHOICE>
      <CHOICE>Vanuatu</CHOICE>
      <CHOICE>Venezuela</CHOICE>
      <CHOICE>Vietnam</CHOICE>
      <CHOICE>Yemen</CHOICE>
      <CHOICE>Zambia</CHOICE>
      <CHOICE>Zimbabwe</CHOICE>
    </CHOICES>

Tuesday, 7 August 2012

SharePoint 2010 Site Template ID Numbers

SharePoint 2010 Site Template ID Numbers

Have found the need of SharePoint Site Templates codes a lot these days while using scripts to create Sites, or restoring a site to a new Site Collection as with SharePoint 2007 you can use a blank template to restore a site which was originally created using some other site template but with SharePoint 2010 you will have to create the site using the same template as the original one to be able to successfully restore the site.
Note: To quickly get a list of SharePoint templates you can even use the Get-SPWebTemplate CMDLet.
Also few of the templates are marked as obsolete i.e the old Records Center template (OFFILE#0) i would suggest you to use the new template is possible while creating a Records center which is [OFFILE#1].
Check the below table for the list of Template & their respective Codes with a brief description.
Name
Title
Description
GLOBAL#0Global templateThis template is used for initializing a new site.
STS#0Team SiteA site for teams to quickly organize, author, and share information. It provides a document library, and lists for managing announcements, calendar items, tasks, and discussions.
STS#1Blank SiteA blank site for you to customize based on your requirements.
STS#2Document WorkspaceA site for colleagues to work together on a document. It provides a document library for storing the primary document and supporting files, a tasks list for assigning to-do items, and a links list for resources related to the document.
MPS#0Basic Meeting WorkspaceA site to plan, organize, and capture the results of a meeting. It provides lists for managing the agenda, meeting attendees, and documents.
MPS#1Blank Meeting WorkspaceA blank meeting site for you to customize based on your requirements.
MPS#2Decision Meeting WorkspaceA site for meetings that track status or make decisions. It provides lists for creating tasks, storing documents, and recording decisions.
MPS#3Social Meeting WorkspaceA site to plan social occasions. It provides lists for tracking attendees, providing directions, and storing pictures of the event.
MPS#4Multipage Meeting WorkspaceA site to plan, organize, and capture the results of a meeting. It provides lists for managing the agenda and meeting attendees in addition to two blank pages for you to customize based on your requirements.
CENTRALADMIN#0Central Admin SiteA site for central administration. It provides Web pages and links for application and operations management.
WIKI#0Wiki SiteA site for a community to brainstorm and share ideas. It providesWeb pages that can be quickly edited to record information and then linked together through keywords.
BLOG#0BlogA site for a person or team to post ideas, observations, and expertise that site visitors can comment on.
SGS#0Group Work SiteThis template provides a groupware solution that enables teams to create, organize, and share information quickly and easily. It includes Group Calendar, Circulation, Phone-Call Memo, the Document Library and the other basic lists.
TENANTADMIN#0Tenant Admin SiteA site for tenant administration. It provides Web pages and links for self-serve administration.
ACCSRV#0Access Services SiteMicrosoft Access Server
ACCSRV#1Assets Web DatabaseCreate an assets database to keep track of assets, including asset details and owners.
ACCSRV#3Charitable Contributions Web DatabaseCreate a database to track information about fundraising campaigns including donations made by contributors, campaign related events, and pending tasks.
ACCSRV#4Contacts Web DatabaseCreate a contacts database to manage information about people that your team works with, such as customers and partners.
ACCSRV#6Issues Web DatabaseCreate an issues database to manage a set of issues or problems. You can assign, prioritize, and follow the progress of issues from start to finish.
ACCSRV#5Projects Web DatabaseCreate a project tracking database to track multiple projects, and assign tasks to different people.
BDR#0Document CenterA site to centrally manage documents in your enterprise.
OFFILE#0(obsolete) Records Center(obsolete) This template creates a site designed for records management. Records managers can configure the routing table to direct incoming files to specific locations. The site also lets you manage whether records can be deleted or modified after they are added to the repository.
OFFILE#1Records CenterThis template creates a site designed for records management. Records managers can configure the routing table to direct incoming files to specific locations. The site also lets you manage whether records can be deleted or modified after they are added to the repository.
OSRV#0Shared Services Administration SiteThis template creates a site for administering shared services.
PPSMASite#0PerformancePointA site for presenting PerformancePoint dashboards and scorecards. The site also includes links to PerformancePoint Dashboard Designer and storage for dashboard content such as analytic charts, reports, KPIs, and strategy maps.
BICenterSite#0Business Intelligence CenterA site for presenting Business Intelligence Center.
SPS#0SharePoint Portal Server SiteThis template is obsolete.
SPSPERS#0SharePoint Portal Server Personal SpaceThis web template defines a Personal Space for an individual participating on a SharePoint Portal.
SPSMSITE#0Personalization SiteA site for delivering personalized views, data, and navigation from this site collection into My Site. It includes personalization specific Web Parts and navigation that is optimized for My Site sites.
SPSTOC#0Contents area TemplateThis template is obsolete.
SPSTOPIC#0Topic area templateThis template is obsolete.
SPSNEWS#0News SiteThis template is obsolete.
CMSPUBLISHING#0Publishing SiteA blank site for expanding your Web site and quickly publishing Web pages. Contributors can work on draft versions of pages and publish them to make them visible to readers. The site includes document and image libraries for storing Web publishing assets.
BLANKINTERNET#0Publishing SiteThis template creates a site for publishing Web pages on a schedule, with workflow features enabled. By default, only Publishing subsites can be created under this site. A Document and Picture Library are included for storing Web publishing assets.
BLANKINTERNET#1Press Releases SiteThis template creates the Press Releases subsite for an Internet-facing corporate presence website.
BLANKINTERNET#2Publishing Site with WorkflowA site for publishing Web pages on a schedule by using approval workflows. It includes document and image libraries for storing Web publishing assets. By default, only sites with this template can be created under this site.
SPSNHOME#0News SiteA site for publishing news articles and links to news articles. It includes a sample news page and an archive for storing older news items.
SPSSITES#0Site DirectoryA site for listing and categorizing important sites in your organization. It includes different views for categorized sites, top sites, and a site map.
SPSCOMMU#0Community area templateThis template is obsolete.
SPSREPORTCENTER#0Report CenterA site for creating, managing, and delivering Web pages, dashboards, and key performance indicators that communicate metrics, goals, and business intelligence information.
SPSPORTAL#0Collaboration PortalA starter site hierarchy for an intranet divisional portal. It includes a home page, a News site, a Site Directory, a Document Center, and a Search Center with Tabs. Typically, this site has nearly as many contributors as readers and is used to host team sites.
SRCHCEN#0Enterprise Search CenterA site for delivering the search experience. The welcome page includes a search box with two tabs: one for general searches, and another for searches for information about people. You can add and customize tabs to focus on other search scopes or result types.
PROFILES#0ProfilesThis template creates a profile site that includes page layout with zones.
BLANKINTERNETCONTAINER#0Publishing PortalA starter site hierarchy for an Internet-facing site or a large intranet portal. This site can be customized easily with distinctive branding. It includes a home page, a sample press releases subsite, a Search Center, and a login page. Typically, this site has many more readers than contributors, and it is used to publish Web pages with approval workflows.
SPSMSITEHOST#0My Site HostA site used for hosting personal sites (My Sites) and the public People Profile page. This template needs to be provisioned only once per User Profile Service Application, please consult the documentation for details.
ENTERWIKI#0Enterprise WikiA site for publishing knowledge that you capture and want to share across the enterprise. It provides an easy content editing experience in a single location for co-authoring content, discussions, and project management.
SRCHCENTERLITE#0Basic Search CenterA site for delivering the search experience. The site includes pages for search results and advanced searches.
SRCHCENTERLITE#1Basic Search CenterThe Search Center template creates pages dedicated to search. The main welcome page features a simple search box in the center of the page. The template includes a search results and an advanced search page. This Search Center will not appear in navigation.
SRCHCENTERFAST#0FAST Search CenterA site for delivering the FAST search experience. The welcome page includes a search box with two tabs: one for general searches, and another for searches for information about people. You can add and customize tabs to focus on other search scopes or result types.
visprus#0Visio Process RepositoryA site for teams to quickly view, share, and store Visio process diagrams. It provides a versioned document library for storing process diagrams, and lists for managing announcements, tasks, and review discussions.

Tuesday, 17 July 2012

Scope of Sharepoint Features

SharePoint Features can be scoped to the Farm, Web Application, Site Collection, and Web Site level depending on the purpose of the feature. The Feature scope is determined by the setting of the Scope attribute in the Feature element defined in the feature.xml file.
A sample Feature element tag is given below:
<Feature Id="F62C96CF-79FD-44be-8882-E9BFBD199184" 
    Title="Feature Title" 
    Description="Feature Description" 
    Version="1.0.0.0" 
    Scope="Site" 
    Hidden="false"> 
</Feature> 


Web Site scoped Feature (Scope="Web"):
A Web Site scoped Feature is one that can be activated only at the individual Web site level. List templates, list instances, custom actions, event receivers, etc are the some common elements for web site scoped features. Web Site scoped features can be activated by using one of the following two methods:
  • Run the following STSADM command:
    stsadm -o installfeature -name FeatureFolderName –url http://servername/site/subsite
  • Open the Site Features page in the SharePoint site (Site Actions -> Site Settings -> Modify All Site Settings -> Site Features) and click the Activate button.

Site Collection scoped Feature (Scope="Site"):
A Site Collection scoped Feature is one that can be activated at the site collection level and contains items that apply to the site collection as a whole (for example, content types that are shared across the site collection), as well as items that can be activated per site (for example, list instances, etc). Site Collection scoped features can be activated by using one of the following two methods:
  • Run the following STSADM command:
    stsadm -o installfeature -name FeatureFolderName –url http://servername/site/sitecollection
  • Open the Site Features page in the SharePoint site (Site Actions -> Site Settings -> Modify All Site Settings -> Site Collection Features) and click the Activate button.

Web Application scoped Feature (Scope="WebApplication"):
A Web Application scoped Feature is one that can be activated at the web application level and contains items like administrative web application links, delegate control registrations, feature/site template association, document form registrations, etc. A farm Feature can contain, for example, links to /_layouts pages and files, /_admin pages, and other elements. Web Applicationscoped features can be activated by using one of the following two methods:
  • Run the following STSADM command:
    stsadm -o installfeature -name FeatureFolderName -url http://servername
  • Open the "Manage Web Application Features" page in the Central Admin application (SharePoint Central Administration -> Application Management -> Manage Web Application Features) and click the Activate button.

Farm scoped Feature (Scope="Farm"):
A Farm scoped Feature can be activated at the server farm level. A farm Feature contains a number of elements that are critical for implementing applications and logic anywhere within a deployment. A farm Feature can contain, for example, links to /_layouts pages and files, /_admin pages, and other elements. Farm scoped features can be activated by using one of the following two methods:
  • Run the following STSADM command:
    stsadm -o installfeature -name FeatureFolderName
  • Open the "Manage Farm Features" page in the Central Admin application (SharePoint Central Administration -> Operations -> Manage Farm Features) and click the Activate button.
Note: Farm scoped feature is activated automatically once it is installed on the server farm.

SharePoint Element Types for Features:
The following table describes various element types for Features and shows their possible settings for scope.


Element Description Scope
Content Type Contains a schema definition you can reuse and apply to multiple list definitions.
Site
Content Type Binding Content type binding enables you to provision a content type on a list defined in the Onet.xml schema. Lists defined in the Onet.xml schema cannot be modified directly.
Site
Control A delegate control contains a registration for a well-known control installed on a Web page. This lets you replace existing controls, such as the Windows SharePoint Services search control, with another control.
Farm, WebApplication, SiteWeb
Custom Action You can define the following kinds of custom actions:
·         Content type links for the content type settings page
·         Drop-down menu actions for the drop-down menu that appears for an item
·         Form toolbar buttons for New, Edit, or Display form toolbars.
·         Site Settings link for the Site Settings page.
Farm, WebApplication, SiteWeb
Custom Action Group Defines a group of custom actions.
Farm, WebApplication, SiteWeb
Document Converter Contains the definition of a document converter. A document converter is a custom executable file that takes a document of one file type, and generates a copy of that file in another file type.
WebApplication
Feature/Site Template Association Binds a Feature to a site definition configuration so that created sites are provisioned with the Feature.
Farm, WebApplication, Site
Field Contains a field definition that can be reused among multiple lists.
Site
Hide Custom Action Hides a custom action that has been added through another custom action.
Farm, WebApplication, SiteWeb
List Instance Provisions a SharePoint site with a specific list of data.
SiteWeb
List Template Contains a list definition or template, which defines a list that can be provisioned in a SharePoint site.
SiteWeb
Module Contains a set of files with which to provision sites.
SiteWeb
Receiver Contains an item event receiver registration.
Web
Workflow Contains the definition for a workflow in a list.
Site