Project Description
This project consists of custom extensions for SharePoint's STSADM tool to easily register, unregister and list event handlers.

There are many ways to register event handler in SharePoint, either through code, using the Feature framework, or other third party tools. You can certainly pick your flavor. However, if you are looking for a quick way to register event handler using STSADM, this project is for you.

This WSP Package is easily deployable as a global solution to your SharePoint environment. After deployment, simply run the STSADM tool with any of the following commands to manage event receivers for your SharePoint site. This tool also uses Reflection to obtain full assembly information for the assembly that holds the custom event handler.

Usage
The following commands will be available for the STSADM tool (note all arguments are required):

addeventhandler - This will add a custom event handler.
  • -siteurl <site url to the site containing the list.>
  • -listname <list or document library display name.>
  • -assembly <full name of GAC'd assembly that holds the event handler. i.e. Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c>
  • -class <namespace to the class that implements event handler. i.e. Microsoft.SharePoint.ACustomEventHandler>
  • -eventtype <type of SPEventReceiverType. i.e. ItemAdding, ItemAdded, etc.>
listeventhandlers - This will list all registered event handlers including GUID.
  • -siteurl <site url to the site containing the list.>
  • -listname <list or document library display name.>
deleteeventhandler - This will remove a custom event handler.
  • -siteurl <site ur to the site containing the list.l>
  • -listname <list or document library display name.>
  • -guid <event handler GUID. Hint: You can get the GUID by using the 'listeventhandlers' command>
Future Releases
I plan to release the same tools for SharePoint 2010 as PowerShell extensions, so please stay tuned.

Feel free to post any comments or issues you have with this project.

My Blog: http://thesharedcontext.wordpress.com

Last edited Aug 27, 2010 at 10:00 PM by mtallman, version 26