Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

start/stop services from DOS prompt

Posted on 2011-02-15
11
Medium Priority
?
689 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Creating Active Directory Users from a Text File

If your organization has a need to mass-create AD user accounts, watch this video to see how its done without the need for scripting or other unnecessary complexities.

Question has a verified solution.

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

New Windows 7 Installations take days for Windows-Updates to show up and install. This can easily be fixed. I have finally decided to write an article because this seems to get asked several times a day lately. This Article and the Links apply to…
ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.
This tutorial will walk an individual through the steps necessary to configure their installation of BackupExec 2012 to use network shared disk space. Verify that the path to the shared storage is valid and that data can be written to that location:…
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 …
Suggested Courses

650 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