This project is read-only.

Project Description

The aim of this project is to add operations to default STSADM command line tool which is opened to extensions.

STSADM can be used for scripting operations so you can run scheduled tasks or run commands on your SharePoint server without having a remote control screen.

Most of these extensions are used during SharePoint site import to another environment (transport package and import script are generated using a tool that will be soon available on CodePlex).

Available operations

Open a command line window (Run cmd) and type one of the following commands:
Legend: <> = element that must be filled, [] = not mandatory element.

Removes all items for specified list.
stsadm –o emptylist
-url < Full url to a site in SharePoint >
-list List Name

Removes all items from recycle bin in the specified site.
stsadm –o emptyrecyclebin
-url < Full url to a site in SharePoint >

Lists all features actived on the specified scope (site collection, site or list).
stsadm –o enumfeatures
-url < Full url to a site in SharePoint >
[-list List Name ]

Lists all existing fields from specified list.
stsadm –o enumfields
-url < Full url to a site in SharePoint >
-list List Name

Relinks all InfoPath forms in the specified list.
stsadm –o relinkinfopathforms
-url < Full url to a site in SharePoint >
-list List Name
Remark: Code is coming from following post:

Allows modifications to field properties.
stsadm –o setfieldproperties
-url < Full url to a site in SharePoint >
-list List Name
-field < Field Name >
[-peoplefieldgroupfilter Group Name ]

Allows modifications to SharePoint groups properties.
stsadm –o setgroupproperties
-url < Full url to a site in SharePoint >
-group < Group Name >
[-owner Group Name ]

Allows modifications to SharePoint user properties.
stsadm –o setuserproperties
-login < Login Name >
[-email Email Address ]


Windows SharePoint Services 3.0 or Microsoft Office SharePoint Server 2007 on the server you will run STSADM commands.


Installation of this package will run with STSADM command line tool itself with the installsolution and deploysolution operations.
An install.bat file is provided and will do all required operations. The only you have to do is to click on it and wait for less than one minute.
Remark: These operations will automatically do an iisreset. Be sure you are able to stop your SharePoint server for some seconds.

Future developments

Following commands are a here for information only. Operations are subject to change.

Allows adding workflow to list.
stsadm –o attachwftolist
-url < Full url to a site in SharePoint >
-list List Name
-workflow < Workflow Name >

Allows adding event handler to list.
stsadm –o attacheventhandlertolist
-url < Full url to a site in SharePoint >
-list List Name
-eventhandler < Workflow Name >

Allows modifications to webparts properties.
stsadm –o setwebpartproperties
-url < Full url to a site in SharePoint >


Source code is provided as is. Please install and test on a test environment before running it on production environment.
Support will be done according to my availability. Please use Issue Tracker or Discussions according of the topic. Feel free to send your feedback about useful parameters.

Last edited Oct 19, 2008 at 9:01 PM by didierdanse, version 4