SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am writing a script to activate/deactivate certain features and there are a couple web application scoped features and when i test the commands, the feature status doesnt change.

Im using:

stsadm -o activatefeature -if {guid} -url {url}

Im not sure how else to do it.

If im not clear, shufler (in the comments below has it worded differently).

share|improve this question
My assumption about what you're asking is that the web application feature is inactive and after running the activatefeature operation it is still inactive. Is this correct? – shufler Jan 16 '12 at 22:31
up vote 1 down vote accepted

Try deactivating and then activating again using the following commands:

  stsadm -o deactivatefeature -id C2EC140A-FF1B-4828-8238-1E37704E53A4 -url http://testwebappl -force

  stsadm -o activatefeature -id C2EC140A-FF1B-4828-8238-1E37704E53A4 -url http://testwebappl -force

Note: Replace the name of Feature GUIDs and web application URL with actual ones.

Important: it is recommended to run above commands as a .bat file to avoid SharePoint GUI timeouts during features activation/deactivation

share|improve this answer
If I used the url that appears in central admin they worked. For instance, I have a webapp that is site-sbx1.domain.sbx, but in central admin in appears as site-sbx1. Strange how it didnt work with the full URL. – John S Jan 17 '12 at 15:25
Thanks again btw. – John S Jan 17 '12 at 15:26

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.