Tag Archive for: Powershell

Quick fix: For security reasons DTD is prohibited in this XML document

02 Feb 2016
February 2, 2016

Another day, another quick fix – I hope it helps!


Working from home is very productive they said – not in my case, the wonderful script to reindex SharePoint Online UserProfiles from Mikael Svenson worked at work – but throws errors at home.



The error “For security reasons DTD is prohibited in this XML document” does not help much…

Quick fix

Google suggested me to change my DNS entries to or – in my case that had no impact at all. Still, my assumption was (Occam’s razor, actually), that it has something to do with DNS – to many blog posts I read said something with DNS.

Easiest way to verify? Fiddler, right!

Fiddler Web Debugger

So in my case it was a combination of my ISP and IPv6 – I changed my DNS on my PC and disabled IPv6 – and everything is back to green!

Back to green!

Back to green!


That post pushed me in the right direction: Office 365 – DTD is prohibited in this document issue – thanks a bunch!

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

24 Feb 2014
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 2013
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?

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.