Site Recycle Bin - issues and recommendations

The Microsoft IT Site Delete Capture tool located on the CodePlex is a highly recommended tool for SharePoint Administrators by the IT Pro community, however we have noticed a few caveats with the default installation, and would also like to clarify some common misunderstandings.

 

When you install the set of features for the site recycle bin all existing webs in your farm will NOT have the necessary features activated to run the site recycle bin code, so you would need to activate the feature called MSITSiteFeature manually on all web.  You can activate this feature by either making it visible through the SharePoint UI, by changing the hidden property on the feature to false (only downfall of this is it then allows any user with full control to deactivate the feature).  Another method of activating this feature would be to add it through code, here is an example on how to add the necessary feature to a single web using PowerShell.

Example PowerShell script 

Along with the wanting to make sure your existing webs have the needed feature enabled, you also need to know that the MSITSiteFeature is only stapled to specific site definitions by default.  If you want to staple the needed feature to ALL site definitions go to the MSITSiteFeatureStapling feature directory (C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES\MSITSiteFeatureStapling) and edit the FeatureStapling.xml file, which is located in the FeatureStapling folder, and add the following line to add the global site definition right above the STS#0 line.

 

<FeatureSiteTemplateAssociation Id="78B94E15-23CE-43f9-8036-BABD847497D1" TemplateName="GLOBAL" />

 

Once this is added ALL new sites created from a site definition will have the necessary features activated however if you are creating sites based off of existing site templates (.stp files) these will not inherently activate the needed features to enable the site recycle bin.  The reason for this is when you create a site based off a site template, feature stapling does NOT apply, even though the site is based off a site definition that feature stapling is enabled on.  The only way to have your new sites, that are created based off of site templates, to have the site recycle bin enabled is to recreate the .stp file based off a site that you manually activate the MSITSiteFeature feature.

 

If others have different suggestions on how to get existing sites enabled through a script OR other ways to get sites created based off of site templates (.stp files) to automatically activate the needed feature, please add comments.

 

["Brian"]


Posted 01-25-2008 9:03 AM by Brian Caauwe

Comments

bbcode is on cheap cialis wrote re: Site Recycle Bin - issues and recommendations
on 11-30-2008 12:34 PM

Yes I agree with you!

Damoun H wrote re: Site Recycle Bin - issues and recommendations
on 02-26-2009 4:08 PM

Thank you for this, it helped me learn more about this feature. But I am still having trouble enabling custom templates to be saved.

I copied that line you have provided right into the FeatureStapling.xml file and created a brand new template, then I made a new site using that template, but when I deleted the site no backup was created. Anyone have any ideas with regards to this?

Thank you

Brian Caauwe wrote re: Site Recycle Bin - issues and recommendations
on 06-22-2009 2:36 PM

Damoun H,

After a little more looking, if you are creating a template off of the “Blank Site” site definition you need to also add another FeatureSiteTemplateAssociation for the TemplateName of STS#1.  The Blank site is a little special in that regards.

["Brian"]

Inetium, LLC. Site Information