Freigeben über


Managing services

Applies To: Windows Server 2003, Windows Server 2003 R2, Windows Server 2003 with SP1, Windows Server 2003 with SP2

Managing services

A service is an application type that runs in the background and is similar to a UNIX daemon application. Services typically provide access to key features such as file servers, Web servers, database servers, and other server-based applications to users, both locally and across the network.

Some of the most common tasks associated with managing services are starting and stopping a service, disabling a service for a hardware profile, and changing the startup method for a service. For more information about other tasks for managing services, see Services How To....

To improve performance and security in the Windows Server 2003 family, several services have been disabled by default that were previously enabled. You should not change the startup method of a service unless you are sure you are choosing the appropriate startup method. For a table that lists the default settings and provides information about how to enable these services, see Default settings for services.

To start, stop, pause, resume, or restart a service

  1. Open Services.

  2. In the details panel, do one of the following:

    • Click the service, and then, on the Action menu, click Start, Stop, Pause, Resume, or Restart.

    • Right-click the service, and then click Start, Stop, Pause, Resume, or Restart.

Caution

  • If you stop, start, or restart a service, any dependent services are also affected. Starting a service does not automatically restart its dependent services. For more information, see View service dependencies.

  • Changing the default service settings might prevent key services from running correctly. It is especially important to use caution when changing the Startup type and Log on as settings of services that are configured to start automatically. In most cases, it is recommended that you not change the Allow service to interact with desktop setting.

Notes

  • To perform this procedure, you must be a member of the Administrators group on the local computer, or you must have been delegated the appropriate authority. If the computer is joined to a domain, members of the Domain Admins group might be able to perform this procedure. As a security best practice, consider using Run as to perform this procedure.

  • To open Services, click Start, click Control Panel, double-click Administrative Tools, and then double-click Services.

  • To start a service with startup parameters, right-click the service, click Properties, and then type the parameters in Start parameters before you click Start. These settings are not persistent; they are are used only once, and then the default settings are restored. (A backslash (\) is treated as an escape character; type two backslashes for each backslash in a parameter.)

To enable or disable a service for a hardware profile

  1. Open Services.

  2. In the details pane, right-click the service that you want to enable or disable, and then click Properties.

  3. On the Log On tab, click the hardware profile that you want to configure.

  4. Click Enable or Disable, and then click OK.

Caution

  • Changing the default service settings might prevent key services from running correctly. It is especially important to use caution when changing the Startup type and Log on as settings of services that are configured to start automatically. In most cases, you should not change the Allow service to interact with desktop setting.

Notes

  • To perform this procedure, you must be a member of the Administrators group on the local computer, or you must have been delegated the appropriate authority. If the computer is joined to a domain, members of the Domain Admins group might be able to perform this procedure. As a security best practice, consider using Run as to perform this procedure.

  • To open Services, click Start, click Control Panel, double-click Administrative Tools, and then double-click Services.

  • You may want to set up a hardware profile to test any newly installed services. For example, you can create two hardware profiles for a newly installed service: one profile in which the service is enabled and a second profile in which the service is disabled. This way, you can troubleshoot any problems that may occur, such as a driver not loading properly.

  • Use caution when disabling services by using this method. If you disable a service for a certain hardware profile, the Hardware Profile settings override the Startup type setting for that service.

  • Use the options in the System Properties dialog box to create and manage hardware profiles.

  • If you receive a Configuration Manager error message when you open the Properties dialog box, verify that the Remote Registry service is running on the target computer. If the Remote Registry service is not running, or if the target computer is running Windows NT 4.0, you cannot view or modify hardware profile settings, but you can perform any other actions. For more information about troubleshooting services, see Troubleshooting Services Snap-in. Also, see "Managing System Services" at the Microsoft Windows Resource Kits Web site.

To start, stop, or change the startup method for a service

  1. Open Services.

  2. In the details pane, right-click the service that you want to configure, and then click Properties.

  3. On the General tab, in Startup type, click Automatic, Manual, or Disabled.

  4. To specify the user account that the service can use to log on, click the Log On tab, and then do one of the following:

    • To specify that the service uses the LocalSystem account, click Local System account.

    • To specify that the service uses the LocalService account, click This account, and then type NT AUTHORITY\LocalService.

    • To specify that the service uses the NetworkService account, click This account, and then type NT AUTHORITY\NetworkService.

    • To specify another account, click This account, click Browse, and then specify a user account in the Select User dialog box. When you are finished, click OK.

  5. Type the password for the user account in the Password box and in the Confirm password box, and then click OK. If you select the Local Service account or Network Service account, the password must be blank.

Caution

  • Most services are not designed to have the default account changed. Changing the default account of a service could result in the service failing to start.

  • Changing the default service settings may prevent key services from running correctly. It is especially important to use caution when changing the Startup type and Log on as settings of services that are configured to start automatically.

  • In most cases, it is recommended that you not change the Allow service to interact with desktop setting. If you allow the service to interact with the desktop, any information that the service displays on the desktop will also be displayed on the interactive user's desktop. A malicious user could then take control of the service or attack it from the interactive desktop.

Notes

  • To open Services, click Start, click Control Panel, double-click Administrative Tools, and then double-click Services.

  • The Local Service account and Network Service account are configured with a null password. Whatever password information you supply is ignored. For more information about service accounts, see Services permissions.

  • It is recommended that user accounts that are used to log on as a service have the Password never expires check box selected in their properties dialog box and that they have strong passwords.

  • If account lockout policy is enabled and the account is locked out, the service will not start.

  • If you enable or disable a service and you encounter a problem starting the computer, you can start the computer in Safe Mode. In Safe Mode, core services that are required to start the operating system are started in a default scheme, regardless of any changes that are made to the service settings. After the computer is in Safe Mode, you can change the service configuration or restore the default configuration.

  • If you specify an account that does not have permission to log on as a service, the Services snap-in automatically grants the appropriate permissions to that account on the computer that you are managing.

  • For more information about the user accounts that a service uses to log on, see "Managing System Services" at the Microsoft Windows Resource Kits Web site.

Information about functional differences

  • Your server might function differently based on the version and edition of the operating system that is installed, your account permissions, and your menu settings. For more information, see Viewing Help on the Web.