Click to Rate and Give Feedback
TechNet
TechNet Library
Office
Technical reference
Stsadm operations
 Deactivatefeature: Stsadm operation
Deactivatefeature: Stsadm operation (Office SharePoint Server)

Updated: 2007-04-26

Operation name: Deactivatefeature

Deactivates a feature in the feature collection.

Syntax

stsadm -o deactivatefeature

   -filename

   -name <feature folder>

   -id <feature ID>

   [-url] <URL name>

   [-force]

Parameters

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.

NoteNote:
If the feature file is not found on disk, the following error message is returned: "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 to deactivate

id

A valid GUID, such as “21d186e1-7036-4092-a825-0eb6709e9281”

Yes

GUID that identifies the feature definition to remove

NoteNote:
If the ID is specified but the feature does not exist, the following error message is displayed: "The feature with Id '<id>' is not currently installed. Use 'force' to deactivate it at this scope."

url

A valid URL, such as http://server_name

Yes

URL of the site collection or Web site to which the feature is being deactivated

force

<none>

No

Specifies that a deactivation of the feature will be forced.

Community Content   What is Community Content?
Add new content RSS  Annotations
example      M. Hassan Raza ... Robert S. Tucker   |   Edit   |   Show History
Wrong::

Stsadm.exe -o deactivatefeature -filename "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES\ViewFormPagesLockDown\feature.xml" -url http://servername/

The above doesnt work, but using the RELATIVE location of feature.xml does work. e.g. translate the above to:

Right:

Stsadm.exe -o deactivatefeature -filename "\ViewFormPagesLockDown\feature.xml" -url http://servername/
Example      mkamoski 1   |   Edit   |   Show History
This also seems to work for me...

Stsadm.exe -o deactivatefeature -filename "ViewFormPagesLockDown\feature.xml" -url http://servername/

...where there is no preceeding backslash in the path to the "feature.xm" file.

Tags What's this?: Add a tag
Flag as ContentBug
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement
Page view tracker