I. installation and deploymentFeature
In useStsadmBefore the command, you can refer to thisArticleSharePoint learning notes-how to add a quick reference to stsadm in the system path (add stsadm In Path)
The procedure is as follows::
1.SetWSPCopy the file to the directory specified by the server you want to deployEg: d:\ Sp2010 \ WSP \ myfeature. WSP
2.ToAdministratorMethod to enter the Command Prompt windowCommand Line (run-> cmd)
3.AddSolution:
Stsadm-O addsolution-filename {path \ wspfilename}
(EG.Stsadm-O addsolution-filenameD:\ Sp2010 \ WSP \ myfeature. WSP)
4.DeploymentSolution:
Stsadm-O deploysolution-name {wspfilename}-URL {siteurl}-allowgacdeployment-immediate
(Eg. Stsadm-O deploysolution-nameMyfeature. WSP-URL http ://Myserver-Sp1: 2010 -Allowgacdeployment-immediate)
IfFeatureThe scope of is not"Web", So you can skip the above'-URL {siteurl}'Parameters
5.Go toFeatureWebsite set(Eg:Http ://Myserver-Sp1: 2010)
Site actions menuÀSite settingsÀSite collection administrationÀSite Collection features , FindFeature,ClickActivateActivate it. Then you can use this website set or its sub-sites in a centralized manner.
Ii. RemoveFeature
The following two steps are required::
1.Stsadm-O retractsolution-name {wspfilename}
(EG.Stsadm-O retractsolution-nameMyfeature. WSP)
2.Stsadm-O deletesolution-name {wspfilename}
(EG.Stsadm-O deletesolution-nameMyfeature. WSP)
You can alsoSharePointTo achieve the following:
central administration --> system settings --> Farm Management --> Manage farm solutions --> select the solution --> click 'retract solution' --> wait a moment, after this operation is complete --> click 'remove solution' . This removes the feature you want to remove.
Verify if you have actually removed yourFeature,You can access the website set you operate: Site actions -->GalleriesÀSolutionsViewFeatureWhether it exists.
OrSiteactions -->Site collection administration --> site collection featuresViewFeatureWhether or not.
Iii. CommonStsadm commands
1. Add the solution
Stsadm-O addsolution-filename {wspfilename}
2. Deploy the solution
Stsadm-O deploysolution-name {wspfilename}-URL {siteurl}
3. Install the feature
Stsadm-O installfeature-filename {featurefolder} \ feature. xml
4. Activate the feature
Stsadm-O activatefeature-ID {featureid}-URL {siteurl}-Force
5. deactive the feature
Stsadm.exe-O deactivatefeature-filename "c: \ Program Files \ common files \ microsoft shared \ Web Server Extensions \ 14\ Template \ Features \Myfeature\ Feature. xml "-ur http ://Myserver-SP1: 2010/
6. Uninstall the feature
Stsadm-O uninstallfeature-filename
7. Retract Solution
Stsadm-O retractsolution-name [-url] [-allcontenturls] [-time] [-immediate]
8. Delete Solution
Stsadm-O deletesolution-name
When you areSharePoint farmThe specifiedFeatureAfter,SptimerThe service automaticallySynchronise/deploy(Synchronization/Deployment)ThisSOlutionHereFarmOn other servers.
Related links:
SharePoint Study Notes-use powershell to add and deploy solution