The Issue

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.

The Workaround

[warning_box]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).[/warning_box]

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 only: /content/20120320/office365stupdater.ps1
Script with cablib: /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!

11 thoughts on “PowerShell Script – Office 365 Site Template Updater v.0.0.1”

  1. Rene:

    I can’t wait to try this out. We need an easy way to move our content to and from The Cloud. Microsoft should offer up tools like this (but easier!) IMO.

    I’ll bet you’ll have a lot of takers for this. Thanks for putting it together!

    M.

    1. Correct, it’s only available for Exchange Online. Managing SPO with PowerShell is still something that is highly requested, but not available.
      My script simply runs with a “local” .wsp template (download it from SPO, then run the script on your computer)

  2. Hi,

    I tried this solution but still this 2 features came under dependencies…

    EnterpriseWikiSecondPhase Feature Site collection level ID: 3f6680ba-94db-4c92-a5b6-7d5c66f467a7
    spoguestintegration Feature Site collection level ID: 9836d446-3785-4579-8480-a27d5c965b19

    Thanks for the Solution

    1. I’ve got same issue with EnterpriseWikiSecondPhase Feature Site collection level ID: 3f6680ba-94db-4c92-a5b6-7d5c66f467a7. I’m trying to use a site template with Publishing activated so technically not supported but hey, worth a shot.

  3. Hi,

    Just wanted to say thank you very much for the PS Script.

    I was experiencing:
    HelpCollectionLiteFeature
    ShellControl Feature

    “Not Activated”

    Everytime I tried to create a new sub-site using a .WSP uploaded template.

    Your PS Solution worked a charm and saved me hours of work! (If only I didn’t spend several hours to find this page!!)

    Many thanks.

  4. This helped me a lot and saved me a lot of time. I had a template from a Sharepoint online environment and wanted to use it in another site collection when suddenly it complained about these weird features it apparently needed.

    Using your script I was able to remove the unneeded features and it seems to work now.

    thnx a lot.

Leave a Reply to Manos Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.