Saturday, June 11, 2011

Never, Never Ever…Uninstall Office Web Apps from Your SharePoint 2010 Server

There are few things which you can do, have an UI for same, but should Never Ever do in SharePoint. One such thing is Uninstalling Office Web Apps from your SharePoint 2010 machine.
You can go to Add-Remove Programs, and Uninstall Office Web Apps. But uninstalling Office Web Apps will remove not only Office Web Apps, but also uninstall SharePoint 2010 and all traces of SharePoint in IIS from the machine. It will leave your databases intact, and if you are in Multiple Servers scenario and with Central Admin still available on another machine, no major harm is done. But if you are on a Single Box Development Farm, its all gone.  I am sure someone will come up with a way to recover since the config and content databases are present, but haven’t tried same.
Why you may want to un-install? Well, you may have deployed Office Web Apps only for POC purpose or realize that you do not have the license for same.  In my case, I was pushing content from one farm to another using content deployment. I had Office Web Apps on Source Staging Farm and not on Destination Farm. My content deployment job failed with a message informing Office web app related feature is not availalble on destination. I thought of disabling the feature, but did not find it in Site Collection Features or Site Features. Not sure if it was hidden or my oversight. I was anyways not using Office Web Apps on source farm, so though why not uninstall it.
It actually gives you a popup warning before it proceeds with Uninstall. Believe me, ignoring the popup and clicking Okay without reading the popup is the most stupid thing I have ever done in my life. Stupid, Stupid Me. No, it was not a customer environment, no data or jobs lost..but its going to cost me a lot (literally).
What’s the right thing to do? Disable the feature….don’t ever uninstall.
Powershell to Deactivate is available on Technet, and is as follows:
$webAppsFeatureId = $(Get-SPFeature -limit all | where {$_.displayname -eq "OfficeWebApps"}).Id
$singleSiteCollection = Get-SPSite -Identity http://<site_name>
Disable-SPFeature $webAppsFeatureId -Url $singleSiteCollection.URL
What's the most stupid thing you have ever done in SharePoint?