Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Start And Stop Windows Service remotely using PSEXEC

How to start and and stop a Windows service remotely using PSEXEC? Preferably the syntax to write I tried the cmdlet given below

psexec \\Server -u Administrator -p Somepassword ServiceName
like image 392
Selwyn Avatar asked Sep 02 '09 07:09

Selwyn


People also ask

How to restart a remote computer using PSExec?

To restart the remote computer, run the following command: If you need to run several commands one by one, it’s better to run the PsExec in the interactive mode on the remote computer. To do this, run the command: Now all the commands that you typed in the command prompt on your local computer, will be executed on the remote lon-srv01 computer.

How does psexesvc work on a remote computer?

After running PSEXESVC, a connection is established for data transfer between this service, and the PsExec process on your computer. When the work is completed, PsExec stops the service and automatically removes it from the remote computer.

How to start the psexesvc service using PSExec?

The SMB port (TCP/445) and UDP/137 ports should be opened on the firewalls between source and target computers. Then PsExec installs and starts the PSEXESVC service using the Windows API functions for managing services.

How do I start/stop a service from a remote computer?

Bring up an admin Command Prompt (Start > type cmd > Ctrl+Shift+Enter) and then type the following: The NET USE command first creates a connection to the remote computer with the credentials of one of its administrators. Then you can use the SC command to query the status of a service and start/stop or change its startup type. A few examples are:


1 Answers

I can't test this right now, but it ought to be:

psexec \\server -u username -p password net start ArgusCommunityWorkerService

and

psexec \\server -u username -p password net stop ArgusCommunityWorkerService
like image 155
RichieHindle Avatar answered Sep 18 '22 00:09

RichieHindle