Installing or Uninstalling Features

You install Features in the 12\Template\Features directory, with each Feature in its own subdirectory. At the root of this folder, a Feature.xml file defines the contents of the Feature.

Note When you create a folder within the Features directory through Windows Explorer by right-clicking a folder, pointing to New, and then clicking Folder, the new folder does not have inherited permissions. If you deploy a Feature in the folder, then some Windows SharePoint Services pages, such as for site settings or list views, throw an exception. You can fix this problem by right-clicking the new folder, click Properties, click Security, and then click Advanced. On the Permissions tab, delete uninherited permissions from the folder. You can also fix this problem by creating the new folder at the command prompt through the md command.

You must install individual Features before you can use them. To do this, run the following command at the command prompt:

stsadm –o installfeature –filename <path of the Feature.xml file relative to the 12\TEMPLATE\FEATURES folder >

When you install Windows SharePoint Services (version 3) and Microsoft Office SharePoint Server 2007, all default Features are automatically installed.

In addition to installing a Feature, you must activate it before you can use it (unless the Feature is Farm scoped, which means it is activated automatically).

To activate a Feature, run the following command:

stsadm –o activatefeature –name < folder in FEATURES directory containing the Feature.xml file > -url http://Server/Site/Subsite

To uninstall a Feature so that its definition is no longer available within a server farm, you can use the uninstall operation.

Note Note:

You must deactivate features before uninstalling them unless they are WebApplication scoped or Farm scoped Features.

After uninstalling a Feature, reset Internet Information Services (IIS) so that changes can take effect.

To deactivate a Feature so that it becomes inactive at its originally assigned scope, you can use the deactivate operation.

Tags :


Community Content

Noelle Mallory - MSFT
uninstall feature
the uninstall feature command is actually "uninstallfeature"
Tags : contentbug

Thomas Lee
stsadm -o uninstall
Even worse, running stsadm -o uninstall will silently start uninstalling SharePoint (as if you chose to remove it using add/remove programs), without asking for confirmation!

It seems to be an undocumented leftover from SharePoint 2.0.

Tags : contentbug

Thomas Lee
Security issues (The farm is unavailable error)
If you are using an account that has no access to the database, you will get the error "The farm is unavailable". To fix this, use an account with enough priviliges and run the command line using "run as".
Tags : wss

Page view tracker