This topic lists and explains the operations you can perform with
Stsadm.exe. For detailed information about the required and optional
parameters, including short forms of the parameters, see
Command-Line Parameters. For more information about using
the command-line tool, see
"Introducing the Administration Tools for Windows SharePoint Services" in the Windows SharePoint Services Administrator's Guide.
Note To use stsadm.exe, you must be a member of the local Administrators group for the server computer.
You can also get a list of the command-line operations by typing
stsadm.exe -help on the command line. Syntax help for specific
operations is available by typing stsadm.exe -help <operation
name>.
Operations in This Topic
addpath
Adds a defined path
(inclusion or exclusion) to a virtual server. For more information, see
Managing Paths.
| Required
parameters | Optional parameters |
| -url -type | <none> |
Sample syntax:
stsadm.exe -o addpath -url <url>
-type <exclusion/explicitinclusion/wildcardinclusion>
addtemplate
Adds a site
template to the template gallery.
Note If you want the changes to the template list to take effect immediately, run the iisreset command after you run the addtemplate operation.
| Required
parameters | Optional parameters |
| -filename -title |
-description |
Sample
syntax:
stsadm.exe -o addtemplate -filename <template filename>
-title <template title> [-description <template description>]
adduser
Adds a user account to
the specified site and assigns it to the specified site group. Use the
siteadmin parameter to register the user as the site
administrator.
| Required parameters |
Optional parameters |
| -url
-userlogin -useremail -role
-username | -siteadmin |
Sample
syntax:
stsadm -o adduser -url <url> -userlogin <DOMAIN\username>
-useremail <someone@example.com> -role <site group name>
-username <user's display name> [-siteadmin]
addwppack
Adds a Web Part package to your server Web Part gallery. Use the globalinstall parameter to install the Web Parts in the global assembly cache (GAC) rather than in the Bin directories of each virtual server. Assemblies installed in the GAC are available to all applications on the server. The url parameter optionally specifies the URL of the virtual server on which to install the Web Parts. To install the Web Parts on every virtual server on a server, omit theurl parameter. Use the force parameter to overwrite an existing Web Part package with a new version, or to repair a Web Part package by reinstalling it. Use the lcid parameter to specify a language for the Web Part package.
Use filename to specify the path to the cabinet file containing the Web Parts and associated resources. If the Web Part package has already been installed on another server in a server farm configuration, you can install the Web Part package from the configuration database by using the name parameter.
| Required parameters | Optional
parameters |
| either -filename or -name | -url -globalinstall
-force
-lcid
|
Sample
syntax:
stsadm.exe -o addwppack -filename <Web Part Package filename>
[-url <url> -globalinstall -force -lcid <language>]
backup
Creates a backup of the site at the specified URL. Use the
overwrite parameter to replace an existing backup file.
| Required parameters | Optional
parameters |
| -url -filename | -overwrite |
Sample
syntax:
stsadm.exe -o backup -url <url> -filename <filename> [-overwrite]
binddrservice
Registers a data retrieval service for the list of data retrieval services that pertain to a specific setting on the Data Retrieval Services Settings page. Specify the service name and then the setting. Settings include enabled, responsesize, timeout, and update.
| Required parameters | Optional
parameters |
| -servicename -setting
| <none> |
Sample
syntax:
stsadm.exe -o binddrservice -servicename <service name> -setting <enabled/responsesize/timeout/update>
createadminvs
Creates the
administration virtual server for Microsoft Windows SharePoint Services. Use the
admapid... parameters to create a new application pool for
IIS, or to specify the application pool to use for the administration virtual
server.
Note This operation is intended for use by other products, and not by administrators of Windows SharePoint Services.
| Required parameters |
Optional parameters |
| <none> |
-admapcreatenew -admapidname -admapidtype
-admapidlogin
-admapidpwd
|
Sample syntax:
stsadm.exe -o createadminvs [-admapcreatenew]
[-admapidname <app pool id>]
[-admapiptype <configurableid/NetworkService/LocalService/LocalSystem>]
[-admapidlogin <app pool user account>] [-admapidpwd <app pool password>]
createsite
Creates a site at
the specified URL with the specified user as owner and administrator. If you do
not specify the template to use, the owner can choose the template when he or she
first browses to the site.
| Required
parameters | Optional parameters |
| -url -ownerlogin
-owneremail | -ownername -lcid
-sitetemplate -title -description
-quota |
Sample syntax:
stsadm.exe -o createsite -url <url>
-ownerlogin <DOMAIN\username> -owneremail <someone@example.com>
[-ownername <display name>] [-lcid <language>]
[-sitetemplate <site template>] [-title <title>]
[-description <description>] [-quota <quota template>]
Note You must specify the -lcid option when using a non-English template.
createsiteinnewdb
Creates a site at the specified URL and creates a new content database
with the username and password you specify. If you do not specify the template
to use, the owner can choose the template when he or she first browses to the
site.
| Required parameters |
Optional parameters |
|
-url
-ownerlogin -owneremail |
-ownername
-databaseuser
-databasepassword
-databaseserver
-databasename -lcid
-sitetemplate -title
-description
-secondarylogin
-secondaryemail -secondaryname |
Sample syntax:
stsadm.exe -o createsiteinnewdb -url <url>
-ownerlogin <DOMAIN\username> -owneremail <someone@example.com>
[-ownername <owner's name>]
[-databaseuser <databaseusername>] [-databasepassword <databasepassword>
[-databaseserver <databaseserver>] [-databasename <databasename>]
[-lcid <language>] [-sitetemplate <site template>]
[-title <title>] [-description <description>]
[-secondarylogin <DOMAIN\username>] [-secondaryemail <someone@example.com>]
[-secondaryname <secondary owner's name>]
Note You must specify the -lcid option when using a non-English template.
createweb
Creates a subsite at
the specified URL. If you do not specify the template to use, the owner can
choose the template when he or she first browses to the site. Use the
unique parameter to specify unique permissions for the subsite.
| Required parameters |
Optional parameters |
| -url | -lcid
-sitetemplate -title -description
-unique |
Sample syntax:
stsadm.exe -o createweb -url <url> [-lcid <language>]
[-sitetemplate <site template>] [-title <title>]
[-description <description>] -unique]
Note You must specify the -lcid option when using a non-English template.
deleteadminvs
Deletes the
administration virtual server for Windows SharePoint Services.
Caution This operation is intended for use by other products, and not by administrators of Windows SharePoint Services. If you delete the administrative virtual server for Windows SharePoint Services, you can no longer manage Windows SharePoint Services. This operation cannot be undone.
| Required parameters | Optional
parameters |
| <none> | <none> |
Sample syntax:
stsadm.exe -o deleteadminvs
deleteconfigdb
Deletes
the configuration database for Windows SharePoint Services.
| Required parameters | Optional
parameters |
| <none> | <none> |
Sample syntax:
stsadm -o deleteconfigdb
deletepath
Removes an
included or excluded path from the list of paths managed by Windows SharePoint Services.
| Required parameters | Optional
parameters |
| -url | <none> |
Sample syntax:
stsadm -o deletepath -url <url>
deletesite
Deletes the specified
site. To delete users from Active Directory directory services, specify true for the deleteadaccounts parameter.
| Required parameters |
Optional parameters |
| -url | <none> |
| -deleteadaccounts |
|
Sample syntax:
stsadm.exe -o deletesite -url <url> -deleteadaccounts <true/false>
deletetemplate
Deletes
the specified site template.
| Required
parameters | Optional parameters |
| -title | -lcid |
Sample syntax:
stsadm.exe -o deletetemplate -title <template title> [-lcid <language>]
deleteuser
Deletes the specified
user.
| Required parameters |
Optional parameters |
| -url
-userlogin | <none> |
Sample
syntax:
stsadm -o deleteuser -url <url> -userlogin <DOMAIN\username>
deleteweb
Deletes the specified
subsite.
| Required parameters |
Optional parameters |
| -url | <none> |
Sample syntax:
stsadm.exe -o deleteweb -url <url>
deletewppack
Removes the Web Parts in a Web Part package from a virtual server. When you delete the last instance of a Web Parts package on a server or server farm, Stsadm.exe also deletes the Web Part package from the configuration database.
The parameter name specifies the name of the Web Part package. The parameter url optionally specifies the URL of the virtual server on which to delete the Web Parts. If url is omitted, Stsadm.exe deletes the Web Parts from the Bin folder of every virtual server on the server or from the global assembly cache.
Use the lcid parameter to remove a particular language version of a Web Part package.
| Required parameters | Optional
parameters |
| -name | -url -lcid
|
Sample syntax:
stsadm -o deletewppack -name <name of Web Part package> [-url <url> -lcid <language>]
disablessc
Disables
Self-Service Site Creation for the specified virtual server.
| Required parameters | Optional
parameters |
| -url | <none> |
Sample syntax:
stsadm -o disablessc -url <url>
disablestsisapis
Disables the Windows SharePoint Services ISAPI extensions. This operation is used by the Setup program for Windows SharePoint Services.
| Required parameters | Optional
parameters |
| <none> | <none> |
Sample syntax:
stsadm -o disablestsisapis
email
Sets the e-mail
configuration settings for your server, or for a specific virtual server (when
you use the url parameter).
| Required parameters | Optional
parameters |
| -outsmtpserver -fromaddress
-replytoaddress -codepage
| -url |
Sample syntax:
stsadm.exe -o email -outsmtpserver <SMTP server>
-fromaddress <someone@example.com> -replytoaddress <someone@example.com>
-codepage <codepage> [-url <url>]
enablessc
Enables Self-Service
Site Creation for the specified virtual server.
| Required parameters | Optional
parameters |
| -url |
-requiresecondarycontact |
Sample syntax:
stsadm -o enablessc -url <url> [-requiresecondarycontact]
enablestsisapis
Enables
the Windows SharePoint Services ISAPI extensions. This operation is used by the Setup program for Windows SharePoint Services.
| Required parameters | Optional
parameters |
| <none> | <none> |
Sample syntax:
stsadm -o enablestsisapis
enumroles
Lists the site
groups that are available for use in a particular site or subsite.
| Required parameters | Optional
parameters |
| -url | <none> |
Sample syntax:
stsadm -o enumroles -url <URL>
enumsites
Lists all of the sites that
have been created under a particular virtual server. The url
parameter must be the URL of a virtual server.
| Required parameters | Optional
parameters |
| -url | <none> |
Sample syntax:
stsadm -o enumsites -url <URL>
enumsubwebs
Lists the
subsites that have been created under a particular site.
| Required parameters | Optional
parameters |
| -url | <none> |
Sample syntax:
stsadm -o enumsubwebs -url <URL>
enumtemplates
Lists the
site templates that are available.
| Required
parameters | Optional parameters |
| <none> | -lcid |
Sample syntax:
stsadm.exe -o enumtemplates [-lcid <language>]
enumusers
Lists the users of a
particular site or subsite.
| Required
parameters | Optional parameters |
| -url | <none> |
Sample syntax:
stsadm.exe -o enumusers -url <url>
enumwppacks
Lists the Web Part Packages currently in your server Web Part gallery.
| Required parameters | Optional
parameters |
| <none> | -name -url
|
Sample syntax:
stsadm -o enumwppacks [-name <name of Web Part Package>]
[-url <URL>]
extendvs
Extends a virtual server with Windows SharePoint Services and creates a new content
database.
Note Extending a virtual server creates a site but does not
require the createsite parameter. Use the donotcreatesite
parameter if you do not want to create a site when you extend the virtual
server.
| Required parameters |
Optional parameters |
|
-url
-ownerlogin -owneremail |
-ownername
-databaseuser (du)
-databaseserver
(ds)
-databasename (dn)
-databasepassword (dp) -lcid
-sitetemplate -donotcreatesite
-apcreatenew
-apidname -apidtype
-apidlogin -apidpwd |
Sample syntax:
stsadm -o extendvs -url <url> -ownerlogin <DOMAIN\username>
-owneremail <someone@example.com> [-ownername <display name>]
[-du <database user>] [-ds <database server>] [-dn <database name>]
[-dp <database user password>][-lcid <lcid>] [-sitetemplate <site template>]
[-donotcreatesite] [-apcreatenew] [-apidname <app pool name>]
[-apidtype <configurableid/NetworkService/LocalService/LocalSystem>]
[-apidlogin <DOMAIN\username>]
[-apidpwd <app pool password>]
extendvsinwebfarm
Extend a virtual server with Windows SharePoint Services for use in a server farm. This
operation does not create a new content database, but allows you to connect to
an existing virtual server (vsname) and use the same content
database.
| Required parameters |
Optional parameters |
|
-url
-vsname |
-apcreatenew
-apidname -apidtype
-apidlogin -apidpwd |
Sample syntax:
stsadm -o extendvsinwebfarm -url <url> -vsname <virtual server name>
[-apcreatenew] [-apidname <app pool name>]
[-apidtype <configurableid/NetworkService/LocalService/LocalSystem>]
[-apidlogin <DOMAIN\username>]
[-apidpwd <app pool password>]
getadminport
Returns the
administration port for Windows SharePoint Services.
| Required
parameters | Optional parameters |
| <none> | <none> |
Sample
syntax:
stsadm -o getadminport
getproperty
Returns the
property value for the specified property name. For a list of valid properties, see Command-Line Properties.
| Required parameters | Optional
parameters |
| -propertyname (pn) |
-url |
Sample syntax:
stsadm -o getproperty -pn <property name> [-url <url>]
removedrservice
Removes a data retrieval service from the list of data retrieval services that pertain to a specific setting on the Data Retrieval Services Settings pages. Specify the service name, and then the setting. Settings include enabled, responsesize, timeout, and update.
| Required parameters | Optional
parameters |
| -servicename -setting
| <none> |
Sample
syntax:
stsadm.exe -o removedrservice -servicename <service name> -setting <enabled/responsesize/timeout/update>
renameweb
Renames the
specified subsite.
| Required
parameters | Optional parameters |
| -url -newname | |
Sample
syntax:
stsadm.exe -o renameweb -url <url> -newname <new subsite name>
restore
Restores a Web site from
a backup file. Use the overwrite parameter to replace any
existing Web site at the new location.
| Required
parameters | Optional parameters |
| -url -filename | -overwrite |
Sample syntax:
stsadm.exe -o restore -url <url> -filename <filename> [-overwrite]
setadminport
Sets the port number for the administration virtual server for
Windows SharePoint Services. Use the ssl parameter to specify a Secure Sockets
Layer (SSL) connection to the port. Use the admap...
parameters to specify the IIS application pool to use or to create a new IIS
application pool for the administration virtual server.
| Required parameters | Optional
parameters |
| -port | -ssl
-admapcreatenew -admapidname
-admapidtype -admapidlogin
-admapidpwd |
Sample
syntax:
stsadm.exe -o setadminport -port <port> [-ssl]
[-admapcreatenew] [-admapidname <app pool id>]
[-admapiptype <configurableid/NetworkService/LocalService /LocalSystem>]
[-admapidlogin <app pool user account>] [-admapidpwd <app pool password>]
setconfigdb
Creates the
configuration database or specifies the connection to an existing configuration
database. Setting the configuration database is required before a virtual
server can be extended.
| Required
parameters | Optional parameters |
| -databaseserver (ds) | -connect -databaseuser (du)
-databasepassword (dp)
-databasename (dn) -hh -adcreation
-addomain -adou |
Sample
syntax:
stsadm.exe -o setconfigdb [-connect] -ds <database server>
[-du <database user>] [-dp <database user password>] [-dn <database name>]
[-hh] [-adcreation] [-addomain <AD domain> [-adou <AD OU>]
setproperty
Sets the
specified property with the specified value. Use the url
property to specify a virtual server or site collection to apply the property
to, or omit the url parameter to apply the property at the
server or server farm level. For a list of valid properties, see Command-Line Properties.
| Required
parameters | Optional parameters |
| -propertyname (pn) -propertyvalue (pv) | -url |
Sample
syntax:
stsadm.exe -o setproperty -pn <property name>
-pv <property value> [-url <url>]
siteowner
Sets the owner or secondary owner of a site collection. Either the
ownerlogin or secondownerlogin parameter must
be used.
| Required parameters |
Optional parameters |
| -url either -ownerlogin or -secondownerlogin | |
Sample syntax:
stsadm.exe -o siteowner -url <url> [-ownerlogin <DOMAIN\username> | -secondownerlogin <DOMAIN\username>]
unextendvs
Removes Windows SharePoint Services
from a particular virtual server. Use the deletecontent
parameter to delete the content databases for the virtual server.
| Required parameters | Optional
parameters |
| -url | -deletecontent |
Sample syntax:
stsadm.exe -o unextendvs -url <url> [-deletecontent]
uninstall
Uninstalls Windows SharePoint Services from the default virtual server at port 80. Any other virtual servers that were extended with Windows SharePoint Services will not be unextended. Uninstall removes the Windows SharePoint Services ISAPI extensions and
any virtual directories or other files from the virtual server. It does not
delete the content databases unless you include the
deletecontent parameter. This operation is used by the Setup program for Windows SharePoint Services.
| Required
parameters | Optional parameters |
| <none> | -deletecontent |
Sample syntax:
stsadm.exe -o uninstall [-deletecontent]
upgrade
Upgrades the server or the specified virtual server with
Windows SharePoint Services. This operation is used by the Setup program for Windows SharePoint Services.
| Required parameters |
Optional parameters |
| <none> |
-url |
Sample syntax:
stsadm.exe -o upgrade [-url <url>]
userrole
Specifies the site
group membership for a user. Use the add and delete parameters
to specify whether to add the user to a site group or remove the user from a
site group.
| Required parameters |
Optional parameters |
| -url
-userlogin -role | -add -delete
|
Sample syntax:
stsadm.exe -o userrole -url <url> -userlogin <DOMAIN\username>
-role <site group name> [-add] [-delete]