Wednesday, July 20, 2016

SharePoint Online MobileExcelWebAccess Feature - Unable to create site using custom template

I am sure you would have got this error suddenly while creating sites using custom template in SharePoint Online.
Error: MobileExcelWebAccess Feature e995e28b-9ba8-4668-9933-cf5c146d7a9f Not activated



Microsoft is unsure about the issue but there is a fix. 

Prerequisites:
- You should be an Administrator 
- Windows PowerShell
- SharePoint Online Management Shell
- SharePoint Online Client Components SDK (Download: http://www.microsoft.com/en-us/download/details.aspx?id=42038)

Steps
1. Open Windows PowerShell in Administrator mode and execute the script
         Set-ExecutionPolicy -ExecutionPolicy Unrestricted

2. Open SharePoint Online Management Shell in Administrator mode and execute the script

$clientDll = [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint.Client")
$runtimeDll = [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint.Client.Runtime")


$url = "https://<your site collection url>"


$cred = get-credential

$clientContext = New-Object Microsoft.SharePoint.Client.ClientContext($url) 
$credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($cred.username, $cred.password) 
$clientContext.Credentials = $credentials 

if (!$clientContext.ServerObjectIsNull.Value) 

    Write-Host "Connected to SharePoint site: '$Url'" -ForegroundColor Green 
}

$clientContext.Site.Features.Add('e995e28b-9ba8-4668-9933-cf5c146d7a9f',$true,[Microsoft.SharePoint.Client.FeatureDefinitionScope]::None)

$clientContext.ExecuteQuery()

Note: Do not forget to replace the $url with your site collection url

Alternatively, you shall save the above #2 script in .ps1 file and execute it.
To execute the .ps1 in SharePoint Online Management shell;
- Open SharePoint Online Management Shell in Administrator mode
- Go to the directory where you have .ps1 file
- Type .\<file name>
- A prompt will be displayed that asks your credential (Administrator)

That's it !!!!!

13 comments:

  1. Thanks a lot! Did work on the first try.

    ReplyDelete
  2. I get the following error:


    Exception calling "ExecuteQuery" with "0" argument(s): "Invalid URI: The hostname could not be parsed."
    At line:1 char:1
    + $clientContext.ExecuteQuery()
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : UriFormatException

    ReplyDelete
    Replies
    1. It seems there would be user error with URL. Can you post the complete code which you have used? Have you followed the steps in order? Or Try the alternate solution (Executing the file that has code. Mentioned at end of the blog. )

      Delete
  3. Is there a way to reverse this command?

    ReplyDelete
    Replies
    1. This Should work. (Remove function instead of Add)

      $clientContext.Site.Features.Remove('e995e28b-9ba8-4668-9933-cf5c146d7a9f', $true);

      Delete
    2. After I did this all the pictures on our sharepoint intranet stopped showing the thumbnail and instead show an X. Do you think this could have caused it? The images are shown in webparts.

      Delete
    3. Remove didn't work got an error:

      Cannot find an overload for "Remove" and the argument count: "3".
      At C:\temp\sharepoint.ps1:19 char:2
      + $clientContext.Site.Features.Remove('e995e28b-9ba8-4668-9933-cf5c146 ...
      + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      + CategoryInfo : NotSpecified: (:) [], MethodException
      + FullyQualifiedErrorId : MethodCountCouldNotFindBest

      Delete
    4. It does not cause any issue.
      Did you replace the function name alone?
      Can you please post the code?

      Delete
  4. What does this powershell actually do on the backend? Is it enabling any of the features?

    ReplyDelete
  5. Thanks a ton, worked perfectly, without an issue. Cheers for that

    ReplyDelete
  6. This saved me! I tried running several scripts, to include the one from here: https://techcommunity.microsoft.com/t5/SharePoint/MobileExcelWebAccess-Feature-Site-Template-Error/m-p/2531#M97
    Nothing worked. I did this exactly as described in your step by step, and it worked. Many thanks!!

    ReplyDelete