Archive for October, 2014

When posting code on your wordpress blog, you will quite often find yourself editing your posts 3 seconds after publishing them. You might have noticed like me that WordPress alters certain characters in posted code, which can be really annoying when you post like 300 lines of Powershell code:-)

To get past this problem, I created a script that corrects the characters that has been changed by Wordpress.
Simply copy your edited text into a text file and save it anywhere on your computer. Then run the code under, point to your file when the “open file dialog box” appears. I hope this saves you a bit of frustration, it has for me!



Often when automating your SharePoint solutions, you will find yourself adding custom customizations, like copying a picture file to a specific location on all your SharePoint servers. To do this we can for example use the following PowerShell code.


I think that title will be my longest ever:-)

Here you will find 3 Functions for starting,stopping and restarting windows services that can target specific servers, local servers and all sharePoint Servers.


When configuring your shiny new Service Applications using PowerShell, depending on the size of your SharePoint farm. You may want to be running some services on multiple SharePoint Servers. The code bellow consists of two functions to start and stop service instances per server.


Useful Powershell code to quickly find the database sizes in your SharePoint farm.

Get-SPDatabase | Sort-Object disksizerequired -desc | %{write-host  “Size: $($_.disksizerequired/1mb)MB – Database: $($_.Name)”}