Announcement

Collapse
No announcement yet.

Restarting services on remote computers

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Restarting services on remote computers

    I want to create a batch file that stops and starts a service on remote desktops.

    I have been using taskkill to stop the service succesfully, but cannot get it to start again.

  • #2
    Re: Restarting services on remote computers

    Have you also tried sc.exe - for stopping and starting the service on the remote computer?

    \Rems

    This posting is provided "AS IS" with no warranties, and confers no rights.

    __________________

    ** Remember to give credit where credit's due **
    and leave Reputation Points for meaningful posts

    Comment


    • #3
      Re: Restarting services on remote computers

      I've tried sc, but it displays the following error:

      [SC] OpenService FAILED 1060:
      The specified service does not exist as an installed service


      This is my script:

      @Echo off
      cls
      echo.
      echo This script will restart SPIAgent service on all standalone desks
      :MANAGER SET
      Echo Stopping SPIAGent service on Manager Set
      sc.exe \\gx520hy5sj1s stop "SPIAgentService.exe"
      Echo Starting SPIAgent service on Manager Set
      sc.exe \\gx520hy5sj1s start SPIAgentService.exe
      Echo Complete

      Comment


      • #4
        Re: Restarting services on remote computers

        Disregard my previous message, i had the service name wrong.

        It is working as expected.

        Thanks for your help.

        Comment

        Working...
        X