Ask Learn
Preview
Ask Learn is an AI assistant that can answer questions, clarify concepts, and define terms using trusted Microsoft documentation.
Please sign in to use Ask Learn.
Sign inThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Applies To: Office SharePoint Server 2007
This Office product will reach end of support on October 10, 2017. To stay supported, you will need to upgrade. For more information, see , Resources to help you upgrade your Office 2007 servers and clients.
Topic Last Modified: 2015-03-09
Activates a feature in the feature collection. You must first determine the scope of the feature. If the scope is Web-based or is a site collection scope, the url parameter is required. However, if the scope is farm-based, the url parameter is not required.
Note
If you try to use the url parameter on a farm-scoped feature, you will receive the following error message: “The feature ‘<feature name>’ applies to the entire farm; the URL parameter cannot be used with farm-scoped features."
stsadm -o activatefeature
** {-filename <relative path to Feature.xml> | -name <feature folder> | -id <feature ID>}**
**\[-url\] \<URL name\>**
**\[-force\]**
Parameter |
Value |
Required? |
Description |
filename |
A valid file path, such as "MyFeature\Feature.xml" |
Yes |
Path to feature must be a relative path to the 12\Template\Features directory. Can be any standard character that the Windows system supports for a file name. Note If the feature file is not found on disk, the following error message is displayed: “Failed to find the XML file at location '12\Template\Features<file path>'.” |
name |
Name of the feature directory, such as “MyFeature” |
Yes |
Name of the feature folder located in the 12\Template\Features directory |
id |
A valid GUID, such as “21d186e1-7036-4092-a825-0eb6709e9280” |
Yes |
GUID that identifies the feature to activate Note If the ID is specified but the feature does not exist, the following error message is returned: "Feature '<id>' is not installed in this farm, and cannot be added to this scope." |
url |
A valid URL, such as http://server_name |
Yes |
URL of the Web application, site collection, or Web site to which the feature is being activated |
force |
<none> |
No |
Activates a feature. This causes any custom code associated with the feature to rerun. |
Ask Learn is an AI assistant that can answer questions, clarify concepts, and define terms using trusted Microsoft documentation.
Please sign in to use Ask Learn.
Sign in