MOSS MVP

I've moved my blog to http://blog.falchionconsulting.com!. Please update your links. This blog is no longer in use--you can find all posts and comments at my new blog; I will no longer be posting to this site and comments have been disabled.

Thursday, March 6, 2008

Roll your own custom stsadm extensions

I decided I would make it easier for people who wish to create their own stsadm templates. I've gone ahead and created a CodePlex project (http://www.codeplex.com/customstsadmtemplate) where you can download a starter project based on my custom commands. I thought about doing this as a Visual Studio template but I both didn't have the time and didn't think there would be enough demand to create lots of these projects so I figured a simple project would be good enough. The project contains all the base stuff that I'm using in my own commands (I've moved some things around though) without all of my custom commands. The nice thing about using this template is that you get lots of validation code for free which makes working with the command line parameters a lot easier (before I built the base classes a large chunk of my code was parameter validation). I put it up on CodePlex so that people can extend it and add to it if desired (I'd like to keep actual commands out of it though). Speaking of CodePlex - I'm curious to know if people think I should move my custom commands there - is there any interest to contribute to what I've done in a community format like CodePlex? If so, please post a comment and let me know.

2 comments:

Anonymous said...

I think it makes sense. A single place to always look for updates. It would also server as a place to create a single document on the options instead of multiple blog pages.

BTW, thanks for your contribution. Many of the commands are life savers.

Bill

Andy Maggs said...

I think it would be a great idea to have a community project based around your excellent extensions and I for one would be glad to contribute to it. At the moment I have 6 commands I could add:
1. setsitelocale - sets the locale for a site
2. setmasterpage - (sets the master page for a site based on the MySiteCreate code doing the same thing)
3. addlistcontenttype - adds a content type to a list
4. removelistcontenttype - removes a content type from a list
5. hidelistcontenttype - hides a content type from the New menu in a list.
6. excludelistuser - not sure about the name for this one but what it does is break the security inheritance for the list (copying security settings from the parent) and then removing the specified user/group from the list.

Hopefully these would be useful to others.

Andy

p.s. sorry if I've posted this twice but I didn't get any feedback after hitting the publish button.