Tag Archive for: Powershell

SharePoint 2013 CU August 2013 – “Internet Information Services not installed”

24 Feb
February 24, 2014

Today it was time to update my SharePoint 2013 installation from March PU 2013 to August 2013 CU – mostly because the Search Schema changed under the hood and I wanted to try something out for the awesome Search Query Tool.


Wow, 1.8GB patch – that is huge! Compared to the RTM version of SharePoint 2013 with 2.4GB they rewrote 75% – or the patching strategy is not that optimal.

MSDN Subscriber Downloads_2014-02-21_15-36-30

Its time for a new baseline so patches can be smaller again. Lets see what happens after the SPC.

You can grab the SharePoint 2013 CU August 2013 patch here: http://support.microsoft.com/hotfix/KBHotfix.aspx?kbnum=2817616&kbln=en-us

KB Details here: http://support.microsoft.com/kb/2817616

Patch notes of Todd Klindt (my inofficial SharePoint patch guru) are here (and no regression reported): http://www.toddklindt.com/blog/Regressions/SP2013Aug13.aspx


For the patching part I always take the script from the article

“Why SharePoint 2013 Cumulative Update takes 5 hours to install?” – if you have not read it, go for it. This time something went bad, maybe because I started the script from ISE or something like that – it could not start the patch process so I did it myself. Took around 30 Minutes on my DEV VM – reboot and we should be ready, right?

“Internet Information Service not installed”

After the patching you have to start the Config Wizard. I was a little surprised as it responds with a nice error –  I even tried the PowerShell command in case there is a difference, but no:

Terminals 3.4.0 (Files store)_2014-02-21_15-12-49

What? IIS not installed anymore? Something must be broken with the Patch – let’s blame Todd for it:

But then I tried to reproduce my steps – of course it must be an user error. After reading the patch script (reading things sometimes helps), I noticed that the script disables the IIS Admin service…

Terminals 3.4.0 (Files store)_2014-02-21_15-31-32

SharePoint does not like that – set it back to Automatic start and start the service.

Starting the site is a good idea, too:


And then start the config wizard again:


And wait until every database is updated:

Terminals 3.4.0 (Files store)_2014-02-21_16-15-49

Search “Paused for:External request”

Then I tried do do a Search – without a success. I went to the Search Service Application page and saw the status: “Paused for:External request” – that means something paused the Service Application (maybe, just maybe someone tried to patch):

Terminals 3.4.0 (Files store)_2014-02-21_16-28-37

and we should resume it – 3 lines of PowerShell:

Lessons learned

Patching can be tough – but when you protocol what you do or can at least reproduce what you have done its pretty much straight forward. I do not blame the patch script here, I obviously did something wrong – but the error message is really misleading isn’t it?

Powershell: Enable Refiner Count for SharePoint 2013 Search Results

23 May
May 23, 2013

The refiner count is a very useful indicator in the Search Center whether the click on the refinement is worth it or nor – and the implementation is so intuitive that even end-users understands it. But: It is disabled by default in SharePoint 2013. This post shows you how to enable the Refiner Count for SharePoint 2013 – manually and with PowerShell.

Refiner Count in SharePoint 2010

The refiner count was introduced in SharePoint 2010 and is a FAST for SharePoint feature. If you don’t have FAST installed and enabled the Refiner Count, the count is estimated roughly with the first 50 results because SharePoint Search was not capable of deep refinement.

Deep refinement is based on the aggregation of managed property statistics for all of the results of a search query. The indexer creates aggregation data that is used in the query matching process. The advantage of using this kind of query refinement is that the refinement options reflect all the items matching a query.

Query Refinement (FAST Search Server 2010 for SharePoint)

In other words, the refiner count could change after you click on a refiner which is very confusing for end-users.

If you have FAST for SharePoint installed the refiner count worked flawlessly but had to be enabled with a xml modification in the refiner webpart.


Refiner Count in SharePoint 2010 + FAST for SharePoint 2010

Refiner Count for SharePoint 2013

The refiner count is still possible with SharePoint 2013 – the concept is not new but the implementation has changed. And as already mentioned, the count is disabled by default:

Refiner Count for SharePoint 2013 not visible

Refiner count not visible (default)

As you might know, you can change the rendering/design of elements with Display Templates in SharePoint 2013, most importantly for search results – this also applies to refiners – which is great if you ask me. Basically all you have to do is change the Display Template for the Refiner Filter which is a html file and you are good to go.

The file is located in the site collections MasterPage gallery folder, /_catalogs/masterpage/Display Templates/Filters/Filter_Default.html and contains the definition for the refinement item.

If you open the file you can see in the very first lines of the file you can see those lines:

Change the lines (replace the false with the true in line 2) to:

And voila, the refiner count is visible:

Refiner Count for SharePoint 2013 visible

Refiner count for SharePoint 2013

PowerShell approach:

You have to do it more than once? Automate it!

Here is my short PowerShell script which automates the step above:



Just download this script and call it with the –siteUrl parameter to enable the Refiner count for the specified Site Collection:

or add -hide to hide the refiner count again:

Enable the Refiner Count for SharePoint 2013 - automated with PowerShell

Enabling/Disabling the refiner count made easy!

Pretty easy, isn’t it?

Powershell: Efficiently empty large SharePoint lists

03 May
May 3, 2013

Previously I had a little console app to efficiently empty large SharePoint lists. Today I converted it to powershell.

Compared to the simple item by item delete with item.Delete() its 30 times faster; on my dev machine it deletes ~30 items per second. It works for SharePoint 2010 and should  for 2013 (not tested, yet).



Delete-Items.ps1 -weburl [url of web] -listname [name of list]

Further improvements

I think if the list is really huge (100k items or greater) the items should be deleted in batches.

I have not tried it with a document library, maybe there are issues. If there are issues, please leave a comment!


There is no way back – if you start the script there is no “ARE YOU SURE?” – all data is gone in a very short time.

Cache cluster is down, restart the cache cluster and Retry

05 Feb
February 5, 2013

Had a small issue with my SharePoint 2013 MySite today, I could not update a User Profile in Central Admin – this is what I got from the ULS Log:


ULSViewer: The exception is pointing us in the right direction.

The Execute method of job definition Microsoft.Office.Server.UserProfiles.LMTRepopulationJob (ID 104963a2-b53c-4476-bc23-fa7d6453e42f) threw an exception. More information is included below.  Unexpected exception in FeedCacheService.IsRepopulationNeeded: Cache cluster is down, restart the cache cluster and Retry.

At least the error message pointed me to the right direction, the Cache Cluster is new in SharePoint 2013 and I associated it with the app fabric distributed cache. As I first read it it sounded like “The King is dead – long live the King!” – but maybe I watch to many movies…


Restart the app fabric service and wait a couple of second with a line of powershell:

SharePoint 2013: Replace the PDF icon

18 Sep
September 18, 2012

Icon madness

Playing arround with SharePoint 2013 and uploading some content for a cool search driven application I noticed that the PDF icon is not the correct one:


OOTB PDF icon from SharePoint 2013

Is it a document with a belt or what ? Nevermind I don’t like it and I am very certain that most of the users out there do not recognize the icon – and that is the main purpose of the icon right?


Search result with out-of-the-box SharePoint 2013 PDF icon

With SharePoint 2010 there was no PDF support out of the box – afaik there was no icon at all. I should be happy and quite right? Nope, created a small powershell that replaced the icon (either you place it next to the script or the script downloads it from the Adobe page).

The result will look like this – way better if you ask me.


Original PDF icon – as expected!


Same icon in a document library


Powershell to the rescue – once again!

And here comes the small script:


Thats it – go try it!

As always, would love to hear your feedback.