Category Archives: PowerShell

Enterprise Search query giving FaultException when using an ORDER BY

Ran into this on a project when using the “FullTextSqlQuery” object to query against the Enterprise Search Service of SharePoint 2010. Had a query that included an Order By clause on my own Managed property other than the normal RANK.

I kept getting an exception: “System.ServiceModel.FaultException`1[System.ServiceModel.ExceptionDetail]” The problem was my Managed Property could not… Read More »

SharePoint and Web.config modifications

Ever since MOSS 2007 we all know the Web.Config Modifications Manager within the SharePoint API. But today I stumbled upon this PowerShell commandlet: Add-WebConfiguration. This commandlet is from the IIS7(.5) powershell module WebAdministration. The short version is, you can use this in you deploy script to do Web.Config modifications Example for an AppSettings Configuration Key:”

Read More »

Custom SPJobDefinition and “Access denied” error

If you create a custom SPJobDefinition and use a Feature Event Receiver to deploy and install this (Timer) SPJobDefinition you receive an error when you call the Update() method: “Access Denied” How to code and install a SPJobDefinition Paul Kotlyar found this on the subject: “Upon detailed investigation of Microsoft.SharePoint.dll  I discovered that SharePoint guys added a… Read More »

Download a solution from your Farm (SP2100)

Wanted to download a solution from my farm. So did it with PowerShell:

Claims Based authentication and the PublishingCache

If you are using Claims Based Authentication on your WebApplication then the Publishing Cache doesn’t work properly. Have a look into your Developer Dashboard to see what is going on: The warning and critical error are: 7362 – Warning Publishing Cache 7363 – Critical Publishing Cache Why is this? Because with Claims Based Authentication the Cache… Read More »

Doing Unit Testing with TFS2010 and SP2010

SharePoint 2010 has a wonderfull new developers experience with Visual Studio 2010 and great integration with Team Foundation Server 2010. We configured our TFS Build server to build our SP2010 solutions fairly easy. Just make sure the SP2010 dll’s you reference in your SP2010 projects are available on the TFS Build Server (in the GAC… Read More »

Small Powershell scripting tip

Want to log the output of your powershell script? use “Start-Transcript”! Top of your powershell script:

and put this at the end of your script:

Powershell and SP2010 (2) – Installing a solution

After reading this blogpost: WaitForWSPJob tool by MIchel Barneveld i had an idea, in SP2010 we can use Powershell to do the waiting because we can access the OM directly.

The script will wait for any execution jobs: Download the powershell script solution.ps1 Update (newer version) : Download the powershell script solution.ps1 Some more powershell