You create a site in your Office 365 environment. You create a template from it (.wsp file), which you then also want to use in your “regular” SharePoint 2010 environment. You add this site template to your site collection’s solution gallery. However, when you try to create a site based on that template, you get errors telling you about missing features (as for example experienced by Marc D. Anderson).
What happened? SharePoint Online uses several features which aren’t available in normal SharePoint 2010 installations. Additionally, some features are only available in the P1 plan and site templates from these cannot be used in the E plans (the opposite is true as well). You can’t deactivate this features in the SharePoint Online UI, and you can’t use PowerShell to quickly connect to your Office 365 environment and deactivate them that way, so you’re stuck.
A big warning first: this is not a real solution, it’s a workaround. I cannot guarantee that this will work always. I cannot guarantee that you can create sites from your site templates afterwards, and even if you can, that all the functionality in these sites will work. I will not provide any support if things go wrong (and Microsoft surely won’t either).
What it does
This PowerShell script takes a solution file (.wsp, your site template), extracts its contents (with the help of cablib.dll, taken from the WSPBuilder project site), updates the ONET.XML file by removing any relevant feature references, and repackages everything back into a solution file.
How to run it
You need PowerShell, the script (and cablib.dll), and a solution file. Open a PowerShell shell, and execute office365stupdater.ps1 <file>, where <file> is the location of your solution. Afterwards, if all went well, you can find an updated solution file in the same folder (named Updated-originalfilename.wsp)
Where to get it
Script with cablib: http://modery.net/content/20120320/office365stupdater.zip
I still can’t create sites, there are still some features missing
First, check if you have any custom features that are active on your SharePoint Online site. Did you install any custom solutions that have active features? Do you have these solutions/features also in the target environment? If you found any other SharePoint Online specific features that aren’t already listed in the script, please let me know.
Not all functionality is working!
Some functionality is really only available on Office 365. For example, the “Create a new shared document using the Office Web Apps” functionality on the Team Site won’t work in regular environments.
How can I help?
Review the code. Test the script. Found anything that can be improved? Please let me know below!