?
Solved

start/stop services from DOS prompt

Posted on 2011-02-15
11
Medium Priority
?
687 Views
Last Modified: 2012-05-11
are commands available for the above?

thanks
0
Comment
Question by:anushahanna
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
  • 2
  • +2
11 Comments
 
LVL 27

Accepted Solution

by:
KenMcF earned 1000 total points
ID: 34897766
You can use net start and net stop

net start SERVICE
net stop SERVICE

To restart
net stop SERVICE && net start SERVICE
0
 
LVL 2

Assisted Solution

by:nimda7
nimda7 earned 336 total points
ID: 34897778
   net stop <service_name>

    net start <service_name>
0
 
LVL 11

Assisted Solution

by:kaskhedikar_tushar
kaskhedikar_tushar earned 332 total points
ID: 34897785
0
Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

 
LVL 6

Author Comment

by:anushahanna
ID: 34897942
thanks - is stop and immediate restart ok, or better to give a pause?
0
 
LVL 27

Assisted Solution

by:KenMcF
KenMcF earned 1000 total points
ID: 34897956
Using
net stop SERVICE && net start SERVICE
it will wait until the serivce is stopped and then continue with the start.
0
 
LVL 6

Author Comment

by:anushahanna
ID: 34898066
there is a display name and then a service name.. i assume i am to choose the second one?
0
 
LVL 10

Assisted Solution

by:c_a_n_o_n
c_a_n_o_n earned 332 total points
ID: 34898071
Another command that can be used is the SC command, it is extremely flexible beyond the stop and start service.

SC stop SERVICE
SC start SERVICE

http://support.microsoft.com/kb/251192
http://ss64.com/nt/sc.html
0
 
LVL 10

Expert Comment

by:c_a_n_o_n
ID: 34898091
use the Service name
0
 
LVL 6

Author Comment

by:anushahanna
ID: 34898093
c_a_n_o_n, what benefit do you envision using SC over NET ?

can you combine both statements into one with SC, like with NET
0
 
LVL 27

Assisted Solution

by:KenMcF
KenMcF earned 1000 total points
ID: 34898209
if you are looking for other options you can do this using powershell to

get-serivce w32time | Stop-service
get-serivce w32time | Start-service

(gwmi win32_service | where {$_.name -eq "w32time"}).startservice
(gwmi win32_service | where {$_.name -eq "w32time"}).stopservice

There are a lot of other options you can do here as well.

$b = gwmi win32_service | where {$_.name -eq "w32time"}

To find all the options for this
$b | Get-member


0
 
LVL 6

Author Comment

by:anushahanna
ID: 34898323
Thanks very much for the options available.
0

Featured Post

Does Your Cloud Backup Use Blockchain Technology?

Blockchain technology has already revolutionized finance thanks to Bitcoin. Now it's disrupting other areas, including the realm of data protection. Learn how blockchain is now being used to authenticate backup files and keep them safe from hackers.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When you start your Windows 10 PC and got an "Operating system not found" error or just saw  "Auto repair for startup" or a blinking cursor with black screen. A loop for Auto repair will start but fix nothing.  You will be panic as there are no back…
After seeing many questions for JRNL_WRAP_ERROR for replication failure, I thought it would be useful to write this article.
This tutorial will walk an individual through locating and launching the BEUtility application to properly change the service account username and\or password in situation where it may be necessary or where the password has been inadvertently change…
This tutorial will walk an individual through the steps necessary to enable the VMware\Hyper-V licensed feature of Backup Exec 2012. In addition, how to add a VMware server and configure a backup job. The first step is to acquire the necessary licen…
Suggested Courses

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question