Listing Event Receivers using STSADM

Posted on Leave a commentPosted in SharePoint 2007, STSADM Commands

This post wraps up my event receiver posts.  I just finished documenting the gl-addeventreceiver and gl-deleteeventreceiver commands and this final command would be gl-enumeventreceivers. 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 […]

Deleting an Event Receiver using STSADM

Posted on Leave a commentPosted in SharePoint 2007, STSADM Commands

I had some time so I decided to add the counterparts to the gl-addeventreceiver command that I just published.  I created two new commands, gl-deleteeventreceiver and gl-enumeventreceivers.  This post will cover the delete command and I’ll go over the enum command in my next post. From a code perspective the delete command is very similar to the add command.  The main difference (aside from the obvious call to Delete instead of Add) is that I’ve […]

Adding Event Receivers using STSADM

Posted on 1 CommentPosted in SharePoint 2007, STSADM Commands

A few months ago I created a CodePlex project that allows you to configure a library to allow the storing of web part page history.  The project at its core used three item event receivers to listen to certain key events and either backup the page or restore the page based on the event.  Recently I was thinking about what might be the best way to allow people to script the settings that enable the […]

Setting List Content Types using STSADM

Posted on 10 CommentsPosted in SharePoint 2007, STSADM Commands

Sometimes when I’m working on a new Feature I find it easier to take certain snippets that I need to test and pull them out into custom STSADM commands.  This enables me to quickly and easily test the core code and without having to go through all the deployment steps.  It was for this purpose that I originally created this new command, gl-setlistcontenttypes.  I did find later that the command ended up being real useful […]

Propagate Content Type Changes

Posted on 55 CommentsPosted in SharePoint 2007, STSADM Commands

This is something that I put together a while ago but I’m only just now getting to the point where I can document it.  I was looking for a solution to a common problem of propagating changes to content types deployed via a Feature and I came across a post by Søren Nielsen.  Søren created a custom stsadm command which handles pushing down the content type changes.  I didn’t want to re-invent the wheel but […]

Export Content Types

Posted on 24 CommentsPosted in SharePoint 2007, STSADM Commands

I was recently working on a client project where there was an environment already setup with several custom content types and custom site columns that had been created. We wanted to reverse engineer those content types and columns so that we could create a Feature that could be used to deploy them into the various environments. I poked around a bit and couldn’t find anything that would simply give me the CAML that I needed […]

Convert a Sub-site to a Site Collection

Posted on 254 CommentsPosted in SharePoint 2007, STSADM Commands

I finally figured it out! This was supposed to be one of those very simple tasks that I should have been able to do without any custom code. Turning a sub-site (or web) into a site collection (or top level site) turned out to be the most difficult task I’ve yet to face with SharePoint 2007. In theory you should be able to do this using the following commands which could be put into a […]

Copy Content Types

Posted on 82 CommentsPosted in SharePoint 2007, STSADM Commands

This turned out to be a lot more challenging than I was expecting it to be. Duplicating a content type required that I learn a lot about how to programmatically create things like site columns and workflows associations and policies. I also had to do a lot of reverse engineering to figure out seemingly simple things such as how the document information panel and document templates are stored. In some cases copying elements became as […]