Friday, February 12, 2016

Error: "WorkflowServiceStore is not a Farm Level Feature and is not found in a Site level defined by the Url"

When I saw the classic message "SharePoint 2013 Workflow platform is not available" in SharePoint 2013 Designer, I thought it's easy to fix.

1. Confirm Workflow Manager Client is installed on all SharePoint servers.
2. Register workflow service for the farm.
3. Enable "WorkflowServiceStore" feature on the site.

However, the script "Enable-SPFeature -Identity WorkflowServiceStore -url $webUrl -Force" throw out the error message below:

Enable-SPFeature : The Feature is not a Farm Level Feature and is not found in a Site level defined by the Url $webUrl.
At line:1 char:1
+ Enable-SPFeature -Identity WorkflowServiceStore -url $webUrl ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidData: (Microsoft.Share...etEnableFeature:
   SPCmdletEnableFeature) [Enable-SPFeature], SPCmdletException
    + FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletEnableFeature

After 30 minutes struggling, finally I realized that the site was still in "SharePoint 2010 mode", so the SPWeb level feature "WorkflowServiceStore" doesn't exist!

The error is quite obvious, but, I wish SharePoint 2013 Designer can give me more informative message  :-(

Wednesday, February 3, 2016

Let's remove all the grasses and shrubs, and only leave trees there

So, the free SharePoint Foundation Server is removed from SharePoint Server 2016.

That reminds me of an old story: a king hates all the bugs, worms and snakes, so he ordered his soldiers to remove all grasses and shrubs in the forest. "Anyway, we only need wood, right?"

What happened to the forest in the end?!

Thursday, January 28, 2016

Failed to call GetTypes on assembly Microsoft.AnalysisServices.SPAddin

After installing SharePoint 2013 CU 201601, the User Profile Sync service stopped working.   After two days of struggling, it seems the best solution is to reinstall SharePoint.

That's fine. The whole lab farm only have two servers.

I uninstalled SharePoint 2013 components on those two servers, then deleted all databases and IIS web folders. Then start to reinstall SharePoint.

Everything is fine, until I tried to join the second server to the newly created farm. An error message popped up: "Failed to call GetTypes on assembly Microsoft.AnalysisServices.SPAddin"

This is strange, as I am pretty sure that PowerPivot was uninstalled. I am not the only one who ever got this problem. It seems the easiest way is to install PowerPivot add-on on all servers.

However, I prefer not to create a clean OOTB SharePoint farm.

It turns out quite easy to fix this problem: search for "Microsoft.AnalysisServices.SPAddin" on hard disk on all servers, and then delete all relevant folders and files. Then reboot the servers.

All the files and folders are in "C:\Windows\Microsoft.NET\assembly" or "C:\Program Files\Common Files\microsoft shared\Web Server Extensions".

Thursday, November 19, 2015

How to get site relative URL through PowerShell, for SPWeb?

It's easy to get server relative URL through "ServerRelativeUrl" property, for SPWeb. But how to get the site relative URL?

Below is how I get it.

$SPSiteServerRelativeUrl = $site.ServerRelativeUrl
$SPWebServerRelativeUrl = $web.ServerRelativeUrl
$SPWebSiteRelativeUrl = ""
if ($web.IsRootWeb -eq $false)
$SPWebSiteRelativeUrl = $SPWebServerRelativeUrl.Replace($SPSiteServerRelativeUrl + "/", "")
Write-Host "SPWebSiteRelativeUrl=$SPWebSiteRelativeUrl" -f DarkYellow

Monday, October 26, 2015

PowerShell color variable

I'd like to standardize the colors in my PowerShell script outputs.  So I need something like "WarningColor", "ErrorColor", "DebuggingColor", etc.

It turns out quite easy.  Below is an example.

$DebuggingColor = [System.ConsoleColor]::DarkGreen
$HighlightColor = [System.ConsoleColor]::Green
$WarningColor = [System.ConsoleColor]::Yellow
$ErrorColor = [System.ConsoleColor]::Red

Write-Host "hello world" -f $DebuggingColor


Saturday, September 26, 2015

Every politician should learn SharePoint

We all heard the sad news from Mecca. When I see the picture below, I realized that there was something wrong.

Some people said that every one should learn to code, I don't agree about that. But, maybe, every politician should learn SharePoint.

Anyone who is familiar with SharePoint knows that we should not put all data into one site collection. Instead, we split the data into different category, and then create an dedicated and isolated site collection for each of the category.

If we split those 2 million people into 1000 groups, and then set 20 meter gap among those groups, would similar stampede ever happen?

100,000 police deployed there didn't help much. It's like, no matter how many CPU cores, how much RAM and how many SSD are there, for a SharePoint farm with even 2000 users, if we put all data into one site collection, sooner or later, we will see the sad ending.

Thursday, August 27, 2015

SharePoint 2016 is good!

After two days of playing on it, I like it!

New and improved features are listed here.  In general, it's like the upgrading from Windows XP to Windows 7.  The main functionalities and UI are same, but got improved everywhere.

My main concerns are:

1. How's the "Add-ins" model get improved?

2. What's going to replace InfoPath?

3. Any AI (Artificial intelligence) in it?

4. Can we put a service (such as "Microsoft SharePoint Foundation Web Application" or "User Profile Synchronization Service") into a Container?

Hopefully we can figure that out in the next six months.

Some screenshots here.

SharePoint Designer 2016 CTP is not released yet, but version 2013 seems still support it, althought the version number is not recognized correctly.