Stop, Start, Enable or Disable Service

You can use the following PowerShell script to Start, Stop, Enable or Disable Windows services on a remote machine. An input file can be used to provide computer names - add all your computer names to input.csv file.More Info:  http://portal.sivarajan.com/2010/07/stopstart-or-e

 
 
 
 
 
4 Star
(10)
15,447 times
Add to favorites
Operating System
3/27/2020
E-mail Twitter del.icio.us Digg Facebook
  • No error checking
    1 Posts | Last post November 04, 2016
    • Script needs some error checking to be complete IMHO but thank you for the script as it is.
  • Could you update it to works on Windows 8?
    1 Posts | Last post December 20, 2013
    • Hello
      
      I´m testing it and works fine for Windows 7. But i don´t get it work on Windows 8.
      Could you update it to works on Windows 8?
      
      Thanks for your job.
  • Workgroup
    4 Posts | Last post September 12, 2013
    • can this be used in workgroup environment using get-credential etc...? if yes, than it will be quite handy!
    • Thanks for the feedback.  I have updated the script which prompts you for a user name and password. 
      
      http://portal.sivarajan.com/2010/07/stopstart-or-enabledisable-service_26.html
      
      http://gallery.technet.microsoft.com/ScriptCenter/en-us/6414efd1-88df-4c98-a7ba-bb36f259c8ea
      
    • Not bad.
    • i would make it into 2 scripts, one for start, one for stop, with a "wrapper script" outside both, feed the 'start' or 'stop' parameter to the wrapper script. Do some sort of error checking between the start / stop - remember, some services get into a 'hung' state (some do like a "stop_pending" or "stopping" and then they never stop completely.