PsService – Windows CMD Command
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
-accepteula Suppress the display of the license dialog.
Typing a command followed by “- ” displays the syntax for that command.
Service States:
1 – Stopped
2 – Start Pending
3 – Stop Pending
4 – Running
When launched for the first time, PsService will create the regkey
HKCU\Software\Sysinternals\PsService\EulaAccepted=0x01
Examples:
Restart the spooler service on \\serverF4T
C:\> psservice \\serverF4T restart spooler