24/11/2011 by Nitesh

Activating and Deactivating features on MOSS using stsadm

Dear Friends,

In my previous post, I wrote about installing and deploying webparts in MOSS server. In this post, I will detail about the process of installing/activating/deactivating/uninstalling features on MOSS using the stsadm utility.

Point to Note: You must be an administrator on the local computer to use Stsadm.

File Located at: Stsadm is located at the following path on the drive where SharePoint Products and Technologies is installed: %WINDOWS DRIVE%\%PROGRAMFILES%\Common Files\microsoft shared\web server extensions\12\bin

Before proceeding to install features to server, we need to make sure that the solution file has been deployed to server as depicted here.

1. Go to Start Menu –> Run –> Type cmd and Hit Enter

 

2. If you have configured your command window’s path to locate the stsadm command, it would run else would throw an error as “stsadm is not recognized as an internal or external command”  To check this, Type stsadm and hit enter. If you do not see the below error, skip to step 3.

3. Deploy the solution if you have not done it already from here.

4. To Activate a Feature if it exists, type the following command:

stsadm -o activateeature -filename {Name of Feature folder}\Feature.xml -url {URL of site to activate feature} -force

Rename the Feature folder name with the feature name as present in VS. Generally, for a solution SOl1 and Feature named Feature1, the folder name is Sol1_Feature1 .

5. To Deactivate a feature, type the following commad in command window.

stsadm -o deactivatefeature -filename {Name of Feature folder}\Feature.xml -force -url {URL of site to activate feature}

Rename the Feature folder name with the feature name as mentioned above in step 3.

6. To uninstall a feature, type the following commad in command window.

stsadm -o uninstallfeature -filename { {Name of Feature folder}\Feature.xml

Rename the Feature folder name with the feature name as mentioned above in step 3.

 

Please let me know your feedback/comments on this. I will be publishing next post to install/uninstall feature using stsadm shortly..Subscribe to get latest nes from the blog!

#SharePoint#stsadm#Utilities#Web parts