Tag Archive for: query

Powershell Script to Efficiently Locate Large Files in SharePoint 2010/2013

23 Mar 2015
March 23, 2015

Recently I had the request to locate all files that are bigger than 40 MB – and they were located in the entire farm across multiple Site Collections.  Easy you might say? Just use search and query for


Well, I said efficiently and thats the most efficient way – you are right! They key constraint here is that those files were excluded from search – so lets go for the PowerShell way.

The Script

Here comes the script that uses PowerShell to iterate over each Site Collection, every Web and every List – then uses CAML to query each list for items larger than the specified size. It works for SharePoint 2013 and should definitely work for 2010, too.

Enough words, here we go:


The result looks like this:

Get large files script in action

Get large files script in actionYou can easily export that to a csv file

You can easily export that to a csv file with:

$result | export-csv result.csv

I ran it again a quite large SharePoint 2013 environment (~1 TB, 1075 Site Collections) and it came back in ~5 minutes.


You see room for improvement for my PowerShell script to efficiently locate large files? If so, please tell me!

SPC14: Managing Search Relevance in SharePoint 2013 and O365

06 Mar 2014
March 6, 2014

Improve the value of search results by managing Relevance. SharePoint 2013 and O365 provide a comprehensive set of tools to manage Search Relevance. SharePoint 2013 and O365 combine and improve upon the best tools available for Fast Search and SharePoint 2010, and introduce the notion of Query Rules that allow administrators to influence relevance for a single query or sets of queries using a straightforward user interface. In this talk, we will explain how ranking works under the hood, and give hands on demonstrations of how to use query rules, result sources, XRANK, federation to external search providers, and use the rank tuning tool to improve relevance and the value of your search solutions. We will explain the Relevance Lifecycle, the iterative process of finding problem queries and fixing them that is essential to optimizing relevance, and discuss which tools are most appropriate for various situations.

My notes for “Managing Search Relevance in SharePoint 2013 and O365” by David Louis Hollembaek and Mikael Svenson.at SharePoint Conference 2014 in Las Vegas.


15 years of search experience on stage

The Problem

Standard search results lack personal relevancy and the result presentation is not that good – this can be done better.


The Plan

What can you adjust? Query? Content? Ranking? User Interface? You can adjust everything.

Goals? What do you want to achieve? Set targets.
Golden set: Create a reference set that is optimized and show that to end users. This motivates users to increase the quality – this was also part of the IA Best Practices session.

Relevancy cycle

Establish a relevancy cycle to adjust the ranking and gather feedback how that worked. Then plan what to adjust, gather feedback and improve.

New Tools

Query Rules: reformate/transform query
Dynamic Ranking Rules: reorder the result ranking
Rank Model Tuning App: a new tool by Mikael
Custom Rank Model: not covered in this session – there is some Technet articles out there.

Capturing Intent: done with Query Rules.

Demo 1: add a result block
Demo 2: add user context / segments to query rule

Search Query Tool v2

New functionalities where added in v2: XRANK freshness generator (new documents are ranked higher than older documents):

Terminals 3.4.0 (Files store)_2014-03-07_17-19-23

Explain Rank feature (why is this result ranked like this)

Terminals 3.4.0 (Files store)_2014-03-07_17-17-09

and much more. I contributed to the project – there was much more added, go try it and provide feedback!

It is a very essential tool when you do something search related – for ITPRO and DEVS.


Download is free – go grab it here.

Ranking App for O365

Mikael showed us the ranking app for O365 that was released in January – wow, good stuff. To modify the ranking in O365 you add the app to your tenant, then you need to add 11 search query and manually rank the results – than the magic happens. It autotunes the ranking set based on your feedback and this could result in a better relevancy for your users. It is O365 only so far – but there will be an on-prem version “later”. Really an interesting approach –  I would love to see that in the general search results – you don’t like your results, please down/up-vote them – that would cool.



Search was my expectation – Search was delivered. Solid presentation, good slides – I am happy with that. Roughly 400 people attended in the very last session, there is a demand for that. Very good message they transported – very good one!


Chocolatey Package: SharePoint 2013 Search Query Tool

09 Feb 2013
February 9, 2013

I am a huge fan of automation and powershell  – this should explain why I really love chocolatey (a package manager to install software with powershell).

Today I created a new feed for SharePoint 2013 Development Tools: http://www.myget.org/feed/Packages/sharepoint2013dev and uploaded the very cool SharePoint 2013 Search Query Tool to the chocolatey gallery. This tool helps creating and testing search querries – and search is everywhere in SharePoint 2013!


After installing chocolatey you can get a great starter toolset with one line of powershell:

This installs 18 tools for SharePoint 2013 development – all of my favorites are included. I maintain a second feed on MyGet for SharePoint 2010 tools, I guess the SP2013 feed will grow and diverge over time.

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.