This command is the simplest of the three as it's just looping through all the event receivers belonging to the specified target and dumping the results out as XML. I've tried to structure the XML so that it conforms to the CAML schema therefore allowing the results to be put into a Feature if desired.
The help for the command is shown below:
C:\>stsadm -help gl-enumeventreceivers stsadm -o gl-enumeventreceivers Enumerates all event receivers associated with the specified target object and outputs the list of receivers as XML. Parameters: -url <web or list URL> -target <site | list | contenttype> [-contenttype <content type name if target is ContentType>]
The following table summarizes the command and its various parameters:
|Command Name||Availability||Build Date|
|gl-enumeventreceivers||WSS v3, MOSS 2007||Released: 9/13/2008
|Parameter Name||Short Form||Required||Description||Example Usage|
|url||Yes||The URL to the web or list to display the event receivers.||-url http://portal/pages|
|target||No||The target object to display the event receivers from. Must be either "list", "site", or "contenttype". If omitted defaults to "list".||-target list|
|contenttype||ct||No, unless target is contenttype||The name of the content type to to get the event receivers from.||-contenttype "Page"
The following is an example of how to display all the event receivers associated with a pages library:
stsadm -o gl-enumeventreceivers -url http://portal/pages -target list
The following is an example output from running the above command: