Nick Grattan's Blog

About Microsoft SharePoint, .NET, Natural Language Processing and Machine Learning

Archive for the ‘SharePoint Tools’ Category

SharePoint Diagnostic Studio

leave a comment »

Talking of tools (see Favorite SharePoint Development Tools), the SharePoint Diagnostic Studio from Microsoft provides SharePoint performance monitoring functionality. This tool is particularly useful for consolidating the ULS records across servers in a SharePoint server farm. It’s part of the Microsoft SharePoint 2010 Administration Toolkit v2.0.

While useful, the user interface is not particularly polished or easy to use. In particular, the SharePoint Diagnostic Studio must be run with the language set to “US-English”, otherwise date formats will be presented incorrectly and date/time filtering will not work.

Overall Description:

Download from:


Written by Nick Grattan

July 1, 2011 at 12:41 pm

Favorite SharePoint Development Tools?

with 4 comments

Here’s a four free development tools you shouldn’t start a SharePoint development project without:

For uploading single or groups of files from the desktop or mail messages from Outlook I use, of course, our “SPDrag&Drop” tool. Take a trial by downloading from here:

Written by Nick Grattan

June 30, 2011 at 1:06 pm

Creating While Loops in SharePoint Designer Workflows using Stateful Workflows – Part 2

with 3 comments

Here’s some additional information to this post about this subject.

An alternative to our solution for while loops in SharePoint Designer workflows have been previously proposed based on setting a workflow to start when an item is changed. This gets over the problem of how to get a workflow to restart itself (which we do with the “Restart This Workflow” action). You can find a description of how to do this here:

However, the technique of a workflow restarting itself when an item changes will not work with SP2. Take a look at this Microsoft post:

In SP2 a workflow cannot restart itself recursively, and so this will break stateful workflows written in this way. Seems strange that Microsoft would introduce a breaking change when using these techniques have been well documented.

Written by Nick Grattan

October 7, 2009 at 12:40 pm

Creating While Loops in SharePoint Designer Workflows using Stateful Workflows

with 14 comments

For an update on this topic please see this blog entry:

Amongst several significant limitations with SharePoint Designer workflows, perhaps the most important is the lack of looping. Therefore, expressing processes like “while not approved, rework” becomes difficult.

We have published a paper that describes how to implement while loops by emulating stateful workflows in Microsoft SharePoint Designer. You can download the paper here (PDF, Oct 2009). The technique uses our “Restart this workflow” custom action, which is part of our “Custom Activity Pack” which can be downloaded here for free.

Update: 10-Nov-2013. Source code and WSP now available in GitHub:

Written by Nick Grattan

October 6, 2009 at 10:00 am

Custom Workflow Action: Send to Records Center

with 7 comments

Our Custom Activity Pack contains actions that can be installed for use in Microsoft SharePoint Designer workflows. The latest version includes an action for sending documents and items to a Records Center site collection directly from your workflows.

The Custom Activity Pack is free and can be downloaded from GitHub:

Other custom actions in this pack include:

  • Start Workflow – Start another workflow for the item or document and return.
  • Call Workflow – Start another workflow and wait until that workflow has completed.
  • Halt Workflow – Halt another workflow executing against the item or document.
  • Restart This Workflow – great for implementing stateful workflows in SharePoint Designer
  • Is Workflow Running – check if another workflow is running against the item or document.

Here is the entire list of actions:


Written by Nick Grattan

October 1, 2009 at 5:18 pm

BDC Catalog Designer from Microsoft!

leave a comment »

Microsoft have released a tool for developing BDC XML catalogs (applications) and it’s part of the Microsoft Office SharePoint Server August SDK.

Find out more here:

Update: 28 November 2008 – Warning; this tool cannot do SQL Server 2005/2008 schemas. This means you cannot use it against AdventureWorks, but you can use it against AdventureWorksDW. This is an astounding limitation given Microsoft’s push towards using schemas. If you try, you’ll get the error “Could not process Table ‘….’. Make sure you have SELECT Rights on the Table/VIEW”. This needs to be fixed.

Written by Nick Grattan

September 29, 2008 at 7:28 am

Posted in SharePoint Tools

Setting Regional Settings with PowerShell

with 8 comments

This  blog entry describes how to use Microsoft PowerShell with the SharePoint and MOSS 2007 object model. Here is an example script that allows the regional settings for a site to be changed and follows the C# example presented here.


Save the file with a “ps1” extension, e.g. “locale.ps1”. The script can be executed in PowerShell by typing:


Note that even if the script file is in the current folder you still need to use the “./” notation to qualify the filename.

Written by Nick Grattan

September 3, 2007 at 11:26 am

Preparing PowerShell for SharePoint and MOSS 2007

with 18 comments

Microsoft PowerShell allows you to write scripts that can use .NET classes, objects, properties and methods. It therefore provides an ideal way of creating script files by calling into the SharePoint and MOSS object model.

First, download Microsoft PowerShell from here and install. PowerShell can then be lanched from the “Start” menu.

The PowerShell execution policy determines if script files can be run – by default they are prohibited for security reasons. Enter the following command to find out about execution policy and signing script files:

get-help about_signing

You can either elect to only run signed scripts (in which case scripts must be signed with a certificate), or to run unsigned scripts from the local file system or to run any unsigned script. For most users, allowing unsigned scripts to run from the local file system is acceptable, so to allow this enter the following commands to set and then retrieve the execution policy (you need to be logged on as administrator):

set-executionpolicy RemoteSigned

Before programming against the SharePoint and/or MOSS 2007 object model the appropriate assemblies must be loaded. The following commands do this:

[System.Reflection.Assembly]::Load(“Microsoft.SharePoint, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c”)
[System.Reflection.Assembly]::Load(“Microsoft.SharePoint.Portal, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c”)

You can place these commands the file called Microsoft.PowerShell_profile.ps1 in a folder called My Documents\WindowsPowerShell to run commands automatically when you run PowerShell (the folder and the file may not exist and may need to be created).

You can now test calling into the SharePoint object model. The following command gets a reference to a site collection at the given URL:


You can review all the property values for the SPSite object by typing the name of the object variable:


You can find an example of creating a script file for chaning a site’s regional settings here.






Written by Nick Grattan

September 3, 2007 at 11:19 am