Blog

Script to import, export and compare crawled and managed properties between SharePoint farms


04 August, 2015

I got really excited when using the export-import-mp.ps1 script by Riccardo Celesti that can export and import managed properties between search service applications in SharePoint. However, I would like to compare all exported properties of one environment to a fresh “vanilla” installation so that a documentation can be created. Export the modified managed properties The export-import-mp script is just great, it will export and import managed properties to and from a CSV file.

Read More...

Filtering CAML queries by time values


03 August, 2015

When querying a SharePoint list, or creating a view, you can filter using the built-in keyword Today. However, the Today keyword will not return the time, only the date when using a CAML query. First of all, you need to mark the query filter value with IncludeTimeValue as: <Value IncludeTimeValue='TRUE' Type='DateTime'><Today /></Value>However, as the Today field has no time information, this will fail. Instead, create a local variable string today = DateTime.Now.

Read More...

Automatically moving SharePoint site collections to separate databases


05 June, 2015

I had a requirement to move site collections into separate databases after a large migration. For this to work, I have one content database that is created as default with maximum number of sites set to 5000. My script will then create new databases with a site limit of 1 and move the site collections to that database.

Read More...

SharePoint 2013 Workflow Gotcha: Unable to start workflow on lists with forced checkout


04 February, 2015

When you try to start the workflow you get an error similar to Activity in progress. Retrying last request. Next attempt scheduled in less than one minute. Details of last request: HTTP InternalServerError to http://SERVER/_vti_bin/client.svc/web/lists/… Check your versioning settings on the list. Does it enforce checkouts using “Require documents to be checked out before they can be edited”? Check your workflow. Is it set to update the stage name? It will not be able to do this.

Read More...

Creating SharePoint Designer reusable workflow with base content type


04 February, 2015

When creating a reusable SharePoint 2013 workflow from SharePoint Designer using the Ribbon, you are unable to bind it to a content type. The (very silly) workaround to this is to create the workflow from the File menu as follows. Doh…!

Read More...