Home XP Commands
XP Syntax

PsService (part of PsTools - download PsService)

View and control services

Syntax
      psservice [\\computer [-u user] [-p passwd]] <command> <options>

Options:

   computer   The computer on which the service is running. Default=local system 

   -p passwd  Specify a password for user (optional). Passed as clear text.
              If omitted, you will be prompted to enter a hidden password.

   -u user    Specify a user name for login to remote computer(optional).

   commands:
      query      Display the status of a service
      config     Display the configuration of a service
      setconfig  Set the start type (disabled, auto, demand) of a service.
      start      Start a service
      stop       Stop a service
      restart    Stop and then restart a service
      pause      Pause a service
      cont       Resume a paused service
      depend     List the services dependent on the one specified
      security   Dump the service's security descriptor
      find       Search the network for the specified service

Typing a command followed by "- " displays the syntax for that command.

Service States:

1 - Stopped
2 - Start Pending
3 - Stop Pending
4 - Running

Examples:

Restart the spooler service on \\server64

psservice \\server64 restart spooler

Related Commands:

NET START/STOP
SC - Service control



Back to the Top

Simon Sheppard
SS64.com