Share via


Provisionservice: Stsadm operation (Windows SharePoint Services)

Applies To: Windows SharePoint Services 3.0

 

Topic Last Modified: 2008-09-08

Description

Starts or stops the SPService on the local computer or a custom service. To enumerate all the current running services with their service types in the farm, use the enumservices operation.

Syntax

stsadm -o provisionservice

**   -action {start | stop}**

**   -servicetype <servicetype>**

**\[-servicename\] \<servicename\>**

Parameters

Parameter name

Value

Required?

Description

action

Either one of the following:

  • Start

  • Stop

Yes

Starts or stops the service on the local computer.

servicetype

Any one of the following:

  • Namespace

  • Assembly qualified name

Yes

Type or assembly qualified name if not SharePoint service.

For example, if you use the enumservices operation, the service type for each service is listed in between <Type></Type> XML tags. One of the services listed is Microsoft.SharePoint.Administration.SPWebService, Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c

Because this is a SharePoint service, you could use any of the following as values for the servicetype parameter:

  • SPWebService

  • Microsoft.SharePoint.Administration.SPWebService

  • Microsoft.SharePoint.Administration.SPWebService, Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c

    Note

    If the value contains spaces, you should enclose the value in double quotes.

If the service is not a SharePoint service, the value must be an assembly qualified service name, such as the example provided in the third bullet of the previous list.

servicename

A valid service name, such as "SPAdmin"

No

The name of the service to provision. If the enumservices operation is run, the service name for each service is listed in between <Name></Name> XML tags. If the service's name is null, then it will just have a <Name /> XML tag. If the service has a null service name, you do not need to include this parameter and value. If the service has a service name, you need to include this parameter and value.

Examples

To stop the SPWebservice, use the following syntax:

stsadm -o provisionservice -action stop -servicetype SPWebservice

After the operation is completed successfully, the following message is displayed:

"If this is a Web service, IIS must be restarted for the change to take effect."

To restart IIS, open a Command Prompt window and type iisreset /noforce.

Once the operation has completed successfully, the following message should be displayed:

"Internet services successfully stopped."