PsService – Windows CMD Command
Notice: A non well formed numeric value encountered in /home/future4tech/public_html/wp-content/plugins/crayon-syntax-highlighter/crayon_formatter.class.php on line 118
Notice: A non well formed numeric value encountered in /home/future4tech/public_html/wp-content/plugins/crayon-syntax-highlighter/crayon_formatter.class.php on line 119
Notice: A non well formed numeric value encountered in /home/future4tech/public_html/wp-content/plugins/crayon-syntax-highlighter/crayon_formatter.class.php on line 118
Notice: A non well formed numeric value encountered in /home/future4tech/public_html/wp-content/plugins/crayon-syntax-highlighter/crayon_formatter.class.php on line 119
View and control services
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
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
1 2 3 4 5 |
Examples: Restart the spooler service on \\serverF4T C:\> psservice \\serverF4T restart spooler |