Solved

start/stop services from DOS prompt

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

thanks
0
Comment
Question by:anushahanna
  • 4
  • 3
  • 2
  • +2
11 Comments
 
LVL 27

Accepted Solution

by:
KenMcF earned 250 total points
Comment Utility
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 84 total points
Comment Utility
   net stop <service_name>

    net start <service_name>
0
 
LVL 11

Assisted Solution

by:kaskhedikar_tushar
kaskhedikar_tushar earned 83 total points
Comment Utility
0
 
LVL 6

Author Comment

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

Assisted Solution

by:KenMcF
KenMcF earned 250 total points
Comment Utility
Using
net stop SERVICE && net start SERVICE
it will wait until the serivce is stopped and then continue with the start.
0
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 
LVL 6

Author Comment

by:anushahanna
Comment Utility
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 83 total points
Comment Utility
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
Comment Utility
use the Service name
0
 
LVL 6

Author Comment

by:anushahanna
Comment Utility
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 250 total points
Comment Utility
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
Comment Utility
Thanks very much for the options available.
0

Featured Post

Why do Marketing keep bothering you?

Is your marketing department constantly asking for new email signature updates? Are they requesting a different design for every department? Do they need yet another banner added? Don’t let it get you down! There is an easy way to manage all of these requests...

Join & Write a Comment

For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
A safe way to clean winsxs folder from your windows server 2008 R2 editions
This tutorial will show how to push an installation of Backup Exec to an additional server in both 2012 and 2014 versions of the software. Click on the Backup Exec button in the upper left corner. From here, select Installation and Licensing, then I…
This tutorial will show how to configure a single USB drive with a separate folder for each day of the week. This will allow each of the backups to be kept separate preventing the previous day’s backup from being overwritten. The USB drive must be s…

744 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now