Stsadm command-line tool (Office SharePoint Server)

Applies To: Office SharePoint Server 2007

This Office product will reach end of support on October 10, 2017. To stay supported, you will need to upgrade. For more information, see , Resources to help you upgrade your Office 2007 servers and clients.

 

Topic Last Modified: 2015-03-09

In this article:

  • Using Stsadm

  • Stsadm is not interactive

  • Available operations and properties

Microsoft Office SharePoint Server 2007 includes the Stsadm tool for command-line administration of Office SharePoint Server 2007 servers and sites. Stsadm is located at the following path on the drive where SharePoint Products and Technologies is installed: %COMMONPROGRAMFILES%\microsoft shared\web server extensions\12\bin. You must be an administrator on the local computer to use Stsadm.

Stsadm provides a method for performing the Office SharePoint Server 2007 administration tasks at the command line or by using batch files or scripts. Stsadm provides access to operations not available by using the Central Administration site, such as changing the administration port. The command-line tool has a more streamlined interface than Central Administration, and it allows you to perform the same tasks. There are certain operations and certain parameters that are only available by using the Stsadm command-line tool.

Using Stsadm

The command-line tool provides access to the complete set of Office SharePoint Server 2007 operations. You can use Stsadm from the command line or with batch files or scripts. Stsadm must be run on the server itself.

To use Stsadm, you must be a member of the local Administrators group on the server. When you invoke Stsadm, you supply an operation and a set of command-line parameters in the form:

-operation OperationName -parameter value

Note

If a value you need to use with the command-line tool includes a space or a character that is treated as special by the command-line interface, such as an ampersand (&), you can enclose the string in quotation marks ("). For example, if the URL to a site is http://my site, you can enter the URL as "http://my site".

Most parameters for the command line also have a short form that you can use instead of the full parameter name. For example, the following command sets the configuration database to use Server1_collab on Server1 and specifies the database user name and password to connect with:

stsadm -o setconfigdb -connect -ds Server1 -dn Server1_collab -du User1 -dp password

The following table explains the commands and parameters from this example.

Command or parameter Definition

-o setconfigdb

Creates a connection between Office SharePoint Server 2007 and a configuration database.

-connect

Specifies that there is an existing configuration database to use.

-ds Server1

Specifies the server name that contains the database to use.

-dn Server1_collab

Specifies the database name to use on that server.

-du User1

Specifies an administrator user name for the database.

-dp password

Specifies the password for the user.

Stsadm is not interactive

Stsadm is not an interactive tool. With Stsadm, you type the operation and parameters all at once. You will not be prompted to fill in missing parameters while the operation is running. If a required parameter is missing, the operation fails, and you must type the operation and parameters again.

This behavior allows better flexibility for batching commands, because the tools do not prompt you for information after you have submitted a command. If you want a more interactive tool, try using the administrative object model or Central Administration pages.

Available operations and properties

For a complete list of Stsadm operations and properties, see Index for Stsadm operations and properties (Office SharePoint Server).

The following operations are available only from the command line:

addcontentdb (the command line is required for adding databases that need to be upgraded)

enumsolutions

renameserver

addsolution

enumtemplates

restore (site collection level)

addwppack

enumwppacks

retractsolution

backup (site collection level)

execadmsvcjobs

retractwppack

binddrservice

export

scanforfeatures

canceldeployment

forcedeletelist

setadminport

copyappbincontent

getadminport

setconfigdb

createadminvs

getproperty

setproperty

createsiteinnewdb

getsitelock

setworkflowconfig

databaserepair

import

spsearchdiacriticsensitive

deleteadminvs

installfeature

syncsolution

deleteconfigdb

migrateuser

uninstallfeature

deletesolution

provisionservice

unregisterwsswriter

deletewppack

refreshdms

updateaccountpassword

deploysolution

refreshsitedms

updatealerttemplates

deploywppack

registerwsswriter

updatefarmcredentials

displaysolution

removedrservice

upgradesolution

enumdeployments

removesolutiondeploymentlock

The following parameters are available only from the command line:

-force

-propertyname

-globalinstall

-propertyvalue

-newname

-servicename

-overwrite

-ssl

See Also

Concepts

Index for Stsadm operations and properties (Office SharePoint Server)