Creating custom STSADM commands for SharePoint

I was just going to start writing a new article on how to create a custom command for STSADM. As I always do, I check the giant net-like thing connected to my computer to see if there is something similar or even better.

And I just saved myself a ton of time, because the article in MSDN covering this is quite good, and not that far from what I would have written myself.

Check it out at

Now, what I did was that I wrote a simple command to re-register features, like

stsadm -o deactivatefeature

stsadm -o uninstallfeature

stsadm -o installfeature

stsadm -o activatefeature

I do this in plenty of projects, and quite often as well, when I test and debug feature registration and such. Made more sense to me to have a command to do it, even though it would only require four lines of a batch file or in the post-build events to accomplish the same thing.

There are plenty of great sites that provide extensions for STSADM, but so far, the best collection I have found is from Gary Lapointe, at Check it out, there are things in his collection I didn’t even realize I needed 🙂

Found this article valuable? Want to show your appreciation? Here are some options:

a) Click on the banners anywhere on the site to visit my blog's sponsors. They are all hand-picked and are selected based on providing great products and services to the SharePoint community.

b) Donate Bitcoins! I love Bitcoins, and you can donate if you'd like by clicking the button below.

c) Spread the word! Below, you should find links to sharing this article on your favorite social media sites. I'm an attention junkie, so sharing is caring in my book!

Pin It

Published by

Bjørn Furuknap

I previously did SharePoint. These days, I try new things to see where I can find the passion. If you have great ideas, cool projects, or is in general an awesome person, get in touch and we might find out together.

Leave a Reply

Your email address will not be published.