Problem - In SharePoint 2010, when you save site as a template, it will be saved as a .wsp file and you can find all web templates in site collection solution gallery. What if, we delete solution without deactivating? so deleted objects became a orphan. How to get find orphaned web templates?
Soltion: We can't get orphaned items from solution gallery when you retrive through Object model. Then, how to get? Using powershell command Get-SPFeature of site collection we will be getting all installed & orphned features. In this case, the web template also stored as a feature. Once you get the feature id, use stsadm or powershell command to deactivate. that't it. You can automate same script to process @ farm/web appliaction level.
Here is the detailed info.
run in sharepoint powershell console.
Get-SPFeature -site XXXXXXX
sample out put
get the required feature id and using stsadm -o deactivatefeature command to deactivate the same.
Happy programming....
Soltion: We can't get orphaned items from solution gallery when you retrive through Object model. Then, how to get? Using powershell command Get-SPFeature of site collection we will be getting all installed & orphned features. In this case, the web template also stored as a feature. Once you get the feature id, use stsadm or powershell command to deactivate. that't it. You can automate same script to process @ farm/web appliaction level.
Here is the detailed info.
run in sharepoint powershell console.
Get-SPFeature -site XXXXXXX
sample out put
get the required feature id and using stsadm -o deactivatefeature command to deactivate the same.
Happy programming....
nice!
ReplyDelete