Solved

start/stop services from DOS prompt

Posted on 2011-02-15
11
685 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
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 84 total points
ID: 34897778
   net stop <service_name>

    net start <service_name>
0
 
LVL 11

Assisted Solution

by:kaskhedikar_tushar
kaskhedikar_tushar earned 83 total points
ID: 34897785
0
Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

 
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 250 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 83 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 250 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

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

A quick step-by-step overview of installing and configuring Carbonite Server Backup.
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
This tutorial will give a short introduction and overview of Backup Exec 2012 and how to navigate and perform basic functions. Click on the Backup Exec button in the upper left corner. From here, are global settings for the application such as conne…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …

749 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