Force deactivating a feature using STSADM

First log on to the C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN folder, then run the commands from there (SDSADM.EXE lives in this folder)

Run the following commands to force deactivating and activating the Forms Services feature:
stsadm -o deactivatefeature -filename IPFSSiteFeatures\feature.xml -force -url %SITE_COLLECTION_URL%
stsadm -o deactivatefeature -filename IPFSWebFeatures\feature.xml -force -url %SITE_COLLECTION_URL%
STSADM.EXE -o activatefeature -filename IPFSSiteFeatures\feature.xml -url %Sitecollection_URL% -force
STSADM.EXE -o activatefeature -filename IPFSWebFeatures\feature.xml -url %sitecollection_URL% -force

STSADM Import Export Top Tip!!

I’ve noticed when performing an STSADM Import / Export, by default these routines do not include draft (unapproved) content in the archive files that get created.
 
After panicking slightly, I discovered that apparently this is not a bug and is by design. If there are documents which are not a published major version or draft copies, they will not be backed up unless you use the -versions 4 switch during the export.
 
It’s likely that in almost all cases we will want to use this switch to ensure all content is migrated. I’ll make a note in my blog!

Moving sites and subsites in SharePoint 2007 Portals

Moving sites and subsites within SharePoint 2007

There is a really cool way that you can move a sharepoint site up or down in your hierarchy.

Let’s say you created a sharepoint site your root level (ie http://intranet/website) and six months later you decide it really should be contained under your IT subsite (http://intranet/it/website). You can use the program STSADM to move a site from one location to another.

Steps to move a WSS subsite.

1. Create the new target URL (I created a blank site @ http://intranet/it/website)
2. Fire up the command line
3. CD \”Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN”
4. Export the old URL using the following Command:

stsadm -o export -url http://intranet/website -filename c:\test\backup.cmp

5. Import the file back into Sharepoint using the the following command:

stsadm -o import -url http://intranet/it/website -filename c:\test\backup.cmp

That’s it! You have moved your website. You need to check user permissions especially if you are moving to a new subsite!

OTHER COOL STUFF: There is an option to -includeusersecurity while you do the export. You can also choose whether or not to pull all the revisionhistory over with the doc libs or not…

For a full view of options for Export / Import, run the following commands to see all your options:

stsadm -o export

stsadm -o import

stsadm feature deployment 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\12\TEMPLATE\FEATURES\ViewFormPagesLockDown\feature.xml” -ur http://servername/
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

Moving sites and subsites within SharePoint 2007

 

There is a really cool way that you can move a sharepoint site up or down in your hierarchy.
Let’s say you created a sharepoint site your root level (ie http://intranet/website) and six months later you decide it really should be contained under your IT subsite (http://intranet/it/website). You can use the program STSADM to move a site from one location to another.
Steps to move a WSS subsite.
1. Create the new target URL (I created a blank site @ http://intranet/it/website)
2. Fire up the command line
3. CD \”Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN”
4. Export the old URL using the following Command:
stsadm -o export -url http://intranet/website -filename c:\test\backup.cmp
5. Import the file back into Sharepoint using the the following command:
stsadm -o import -url http://intranet/it/website -filename c:\test\backup.cmp
That’s it! You have moved your website. You need to check user permissions especially if you are moving to a new subsite!
OTHER COOL STUFF: There is an option to -includeusersecurity while you do the export. You can also choose whether or not to pull all the revisionhistory over with the doc libs or not…
For a full view of options for Export / Import, run the following commands to see all your options:
stsadm -o export
stsadm -o import