Solved

start/stop services from DOS prompt

Posted on 2011-02-15
11
684 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Sometimes people don't understand why download speed shows differently for Windows than Linux.Specially, this article covers and shows the solution for throughput difference for Windows than a Linux machine. For this, I arranged a test scenario.I…
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 show how to configure a new Backup Exec 2012 server and move an existing database to that server with the use of the BEUtility. Install Backup Exec 2012 on the new server and apply all of the latest hotfixes and service packs. The…
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles to another domain controller. Log onto the new domain controller with a user account t…

773 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