Udostępnij za pośrednictwem


Psconfig command-line reference (SharePoint Server 2010)

 

Applies to: SharePoint Server 2010, SharePoint Foundation 2010

In SharePoint 2010 Products, you can use the Psconfig command-line tool as an alternative interface to perform several operations that control how SharePoint 2010 Products are configured. You must be a member of the Administrators group on the local computer to perform these operations.

In this article

  • How to use Psconfig commands

  • Available commands and parameters

How to use Psconfig commands

When you run Psconfig at a command prompt, you can specify commands to control how the tool runs. To run Psconfig at a command prompt, navigate to the %COMMONPROGRAMFILES%\Microsoft Shared\web server extensions\14\bin folder, and then type the commands by using the following syntax:

psconfig.exe -cmd <command> [optional parameters]

The reference table in the next section contains several examples. Help is also available from the command-line interface. To view Help, at the command prompt, type:

psconfig.exe -?

To view Help about a specific command, type:

psconfig.exe -help <command name>

The commands in Psconfig must be run in a specific order to run successfully. If you use the SharePoint Products Configuration Wizard to configure an installation, it calls the commands (also known as configuration tasks) in the correct order for you. However, if you use the command line to run Psconfig, you must make sure that you are performing the tasks in the correct order. The Psconfig commands must be performed in the following order:

  1. configdb

  2. helpcollections

  3. secureresources

  4. services

  5. installfeatures

  6. adminvs

  7. evalprovision (only for stand-alone installations)

  8. applicationcontent

  9. upgrade

Important

If Psconfig detects that the server farm has to be upgraded, it will automatically start an upgrade when you run it (even if you did not select the upgrade command).

You can specify all the commands to run in a single command-line string. If you do this, Psconfig runs all the commands in the correct order. For example, at the command prompt, you can run a command similar to the following:

psconfig.exe -cmd configdb <parameters>
-cmd helpcollections <parameters>
-cmd secureresources <parameters>
-cmd services <parameters>
-cmd installfeatures <parameters>
-cmd adminvs <parameters>
-cmd evalprovision <parameters>
-cmd applicationcontent <parameters>

For more information about how to configure a server or server farm from the command line, see the Microsoft SharePoint Server 2010 TechCenter.

Available commands and parameters

In the SharePoint Products Configuration Wizard, the following command-line options are recognized.

Command Description, parameters, and examples

?

Displays the commands available for use with Psconfig.

Example

psconfig.exe -?

help <command name>

Displays the commands available for use with Psconfig. If a command name is specified, displays help for that command.

Example

psconfig.exe -help adminvs

adminvs

Manages the SharePoint Central Administration Web application on the local computer. Takes the following optional parameters:

[-provision]

Provisions the SharePoint Central Administration Web application on this server. Provisioning creates a new SharePoint Central Administration Web application and an application pool running under the server farm administrator's account.

[-unprovision]

Unprovisions the SharePoint Central Administration Web application from this server. Unprovisioning removes the SharePoint Central Administration Web application and its application pool.

[-port <port number>]

The SharePoint Central Administration Web application port is a global setting to the server farm. When changing the port, a SharePoint Timer service job is dispatched to synchronize the port for all SharePoint Central Administration Web applications in the server farm. If a port is not specified, the port that is used for existing SharePoint Central Administration Web applications in the server farm is used. If a SharePoint Central Administration web Application has not been provisioned in the server farm, the default port selected will be random if a port is not specified.

[-windowsauthprovider <enablekerberos | onlyusentlm>]

The SharePoint Central Administration Web application authentication provider is a global setting to the server farm. When you change the authentication provider, a SharePoint Timer service job will be dispatched to synchronize the provider on all SharePoint Central Administration Web Applications in the server farm. If onlyusentlm is specified, NTLM will be the exclusive authentication provider for all SharePoint Central Administration Web applications. All other authentication providers are disabled and NTLM will be the only authentication provider allowed. If enablekerberos is specified, Kerberos authentication is enabled for all SharePoint Central Administration Web applications. If an authentication provider is not specified, the provider that is used for existing SharePoint Central Administration Web applications in the server farm will be used. If a SharePoint Central Administration Web application has not been provisioned in the server farm, the Kerberos authentication provider will be enabled if an authentication provider is not specified.

Examples

psconfig.exe -cmd adminvs -provision -port 8080 -windowsauthprovider onlyusentlm

psconfig.exe -cmd adminvs -unprovision

applicationcontent

Manages shared application content. Takes the following required parameter:

-install

Copies shared application data (for example, resource files and Web application binaries) to existing Web application virtual directories.

Example

psconfig.exe -cmd applicationcontent -install

configdb

Creates, connects, or disconnects this server from the server farm. Takes the following optional parameters:

[-create]

Creates a new configuration database and therefore establishes a new server farm. If this server is already connected to a configuration database, the server will be disconnected first, and then the new configuration database will be created.

[-disconnect]

Disconnects this server from the configuration database and therefore disconnects this server from the server farm.

[-connect]

Connects to an existing configuration database and therefore joins this server to an existing server farm. If this server is already connected to a configuration database, the server will be disconnected first, and then connected to the existing configuration database.

[-server <SQLServerName>]

The computer that is running Microsoft SQL Server where the configuration database is located.

[-database <SQLDatabaseName>]

The configuration database name.

[-dbuser <value>]

The user name that is used for SQL authentication.

[-dbpassword <value>]

The password that is used for SQL authentication.

[-user <Domain\User>]

The server farm administrator user account.

[-password <Password>]

The server farm administrator user account password.

[-addomain <value>]

The Active Directory domain name that is used for the server farm.

[-adorgunit <value>]

The Active Directory organization unit name that is used for the server farm.

[-admincontentdatabase <SQLAdminContentDatabaseName>]

The Central Administration Web application content database name.

Examples

psconfig.exe -cmd configdb -create -server <Server_name> -database <Database_name>

-dbuser <DOMAIN\username> -dbpassword <password>

-user <DOMAIN\username> -password <password>

-addomain <domain_name> -adorgunit <org_unit>

-admincontentdatabase <Database_name>

psconfig.exe -cmd configdb -disconnect

psconfig.exe -cmd configdb -connect -server <Server_name> -database <Database_name>

-dbuser <DOMAIN\username> -dbpassword <password>

evalprovision

Provisions this server as a stand-alone (evaluation mode) server. Takes the following required and optional parameters:

-provision

Performs stand-alone mode provisioning on this server.

[-port <port number>]

The port number assigned to the default SharePoint Web application. If not specified, port 80 is used. If a SharePoint Web application already exists and is using the port, the existing site will be overwritten. If an existing site is using the port and is not a SharePoint Web application, the site will be disabled and a new SharePoint Web application will be created that uses the port.

[-overwrite]

Specifies whether to overwrite any existing Microsoft SharePoint Server 2010 Web site during installation. If not specified, the site is not deleted.

Example

psconfig.exe -cmd evalprovision -provision -port 1100

helpcollections

Manages help collections. Takes the following required parameter:

-installall

Installs all available help collections.

Example

psconfig.exe -cmd helpcollections -installall

installfeatures

Registers any SharePoint Products and Technologies features located on the file system of this server with the server farm.

Example

psconfig.exe -cmd installfeatures

quiet

Runs the SharePoint Products Configuration Wizard in quiet mode. Output is written to the log file that is named PSCONFIG.EXE_MM_DD_YY_HH_MM_SS_MS.log, where "_MM_DD_YY_HH_MM_SS_MS" is the full date and time that the utility was run. The log file is stored in the %COMMONPROGRAMFILES%\Microsoft Shared\web server extensions\14\LOGS directory.

Example

psconfig.exe -cmd quiet

secureresources

Performs SharePoint 2010 Products resource security enforcement on the server. For example, security is enforced on files, folders, and registry keys.

Example

psconfig.exe -cmd secureresources

services

Manages SharePoint 2010 Products services. Takes the following optional parameters:

[-install]

Registers the services in the server farm that are located on this server.

[-provision]

Provisions the services that are located on this server and sets the services as online if SharePoint 2010 Products are installed in stand-alone mode. Provisioning services also ensures that they are registered.

Note

The [-provision] parameter is supported only for a single server, stand-alone installation. Do not use this parameter for a farm installation.

Example

psconfig.exe -cmd services -install

psconfig.exe -cmd services -provision

setup

Performs configuration for SharePoint 2010 Products based on the installation mode. Also repairs the configuration. If the product is installed in stand-alone mode, stand-alone configuration is complete. If the product is not in stand-alone mode, you must complete the initial configuration by using the SharePoint Products Configuration Wizard instead of the Psconfig command-line tool. To run the wizard, on the Start menu, point to All Programs, point to Administrative Tools, and then click SharePoint Products Configuration Wizard.

If you want to repair a stand-alone installation, first run setup /repair (for more information, see the Setup Help system), and then psconfig.exe -setup. For server farm installations, after you run setup /repair, use the SharePoint Products Configuration Wizard instead of the Psconfig command-line tool.

Takes the following optional parameter:

[-lcid <1033>]

The locale ID (LCID) that specifies the installation language.

Example

psconfig.exe -cmd setup

standaloneconfig

Performs a stand-alone configuration for SharePoint Products and Technologies. Takes the following optional parameters:

[-lcid <1033>]

The locale ID (LCID) that specifies the installation language.

Example

psconfig.exe -cmd standaloneconfig

upgrade

Performs an upgrade of SharePoint 2010 Products. This command is automatically run when you run the SharePoint Products Configuration Wizard if the product has to be upgraded. Takes the following optional parameters:

[-wait]

If specified, the SharePoint Products Configuration Wizard does not return until the upgrade is complete. If not specified, the wizard returns after dispatching a SharePoint Timer Service job to perform the upgrade. To view the upgrade job status, you can access the SharePoint Central Administration Web site by using your Web browser.

[-force]

If specified, the SharePoint Products Configuration Wizard stops any currently running upgrade actions, and then restarts upgrade.

[-reghostonupgrade]

If specified, the SharePoint Products Configuration Wizard will reset all content to the site definition version during the upgrade.

[-inplace <v2v|b2b>]

If specified, the SharePoint Products Configuration Wizard will perform an in-place upgrade. If v2v is specified, an in-place version to version upgrade is performed. If b2b is specified, an in-place build to build upgrade is performed.

[-preserveolduserexperience]

If set to false, the SharePoint Products Configuration Wizard will update sites to use the latest SharePoint user experience. If you do not specify this parameter, the default is true.

[-passphrase]

Passphrase used to join the server farm. The Passphrase value must be the same on all servers in the farm if the farm is to function correctly.

Example

psconfig.exe -cmd upgrade -inplace v2v -wait