Entfernten Service mit Hilfe des Service Controllers durchstarten

Möchte man beispielsweise den Prozess w32time (Windows Zeitdienst) einmal durchstarten reicht die Eingabe des verketteten Befehls in einer cmd mit administrativen Rechten:

C:\Windows\system32>net stop w32time && net start w32time
The Windows Time service is stopping.
The Windows Time service was stopped successfully.

The Windows Time service is starting.
The Windows Time service was started successfully.

Soll dieses Durchstarten vom Prozess w32time beispielsweise auf einem entfernten Ziel-Server / PC ausgeführt werden hilft der Service Controller vom Windows:

C:\Windows\system32>sc \\vh01 stop w32time && sc \\vh01 startw32time

SERVICE_NAME: w32time
TYPE               : 20  WIN32_SHARE_PROCESS
STATE              : 3  STOP_PENDING
(NOT_STOPPABLE, NOT_PAUSABLE, IGNORES_SHUTDOWN)
WIN32_EXIT_CODE    : 0  (0x0)
SERVICE_EXIT_CODE  : 0  (0x0)
CHECKPOINT         : 0x2
WAIT_HINT          : 0x3e8

SERVICE_NAME: w32time
TYPE               : 20  WIN32_SHARE_PROCESS
STATE              : 2  START_PENDING
(NOT_STOPPABLE, NOT_PAUSABLE, IGNORES_SHUTDOWN)
WIN32_EXIT_CODE    : 0  (0x0)
SERVICE_EXIT_CODE  : 0  (0x0)
CHECKPOINT         : 0x0
WAIT_HINT          : 0x7d0
PID                : 1000
FLAGS              :

Nähere Informationen zum SC gibt es hier: https://technet.microsoft.com/de-de/library/bb490995.aspx.

PS: Mit net time kann man sich auch die entfernte Zeit anzeigen lassen:

C:\Windows\system32>net time \\vh01
Current time at \\vh01 is 23.10.2015 19:48:12

The command completed successfully.

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert

Time limit is exhausted. Please reload CAPTCHA.