2003 server question

OutHouse

Lifer
Jun 5, 2000
36,410
616
126
what is the command to stop and restart a service on another machine?

i want to stop and restart a service on a 2003 server from a NT Server on the same domain and both logged in as admin.
 

OutHouse

Lifer
Jun 5, 2000
36,410
616
126
Originally posted by: Drakkon
why not just remote desktop in and stop it thata way?

because i have a log monitor that will kick off a bat file when it sees no activity for a targeted log file. that bat file is what i want to use to stop and restart the service. I want to do this so i dont have to get up in the middle of the night because i got paged because a service got hung.

there has to be a way to do this... i cant believe there is no way to stop and restart services on a remote server.
 

iamwiz82

Lifer
Jan 10, 2001
30,772
13
81
Originally posted by: Citrix
Originally posted by: Drakkon
why not just remote desktop in and stop it thata way?

because i have a log monitor that will kick off a bat file when it sees no activity for a targeted log file. that bat file is what i want to use to stop and restart the service. I want to do this so i dont have to get up in the middle of the night because i got paged because a service got hung.

there has to be a way to do this... i cant believe there is no way to stop and restart services on a remote server.

net start and net stop, IIRC.
 

djheater

Lifer
Mar 19, 2001
14,637
2
0
Originally posted by: djheater
TASKKILL [/S system [/U username [/P [password]]]]
{ [/FI filter] [/PID processid | /IM imagename] } [/F] [/T]

Description:
This command line tool can be used to end one or more processes.
Processes can be killed by the process id or image name.

Parameter List:
/S system Specifies the remote system to connect to.

/U [domain\]user Specifies the user context under which
the command should execute.

/P [password] Specifies the password for the given
user context. Prompts for input if omitted.

/F Specifies to forcefully terminate
process(es).

/FI filter Displays a set of tasks that match a
given criteria specified by the filter.

/PID process id Specifies the PID of the process that
has to be terminated.

/IM image name Specifies the image name of the process
that has to be terminated. Wildcard '*'
can be used to specify all image names.

/T Tree kill: terminates the specified process
and any child processes which were started by it.

/? Displays this help/usage.