Forum Discussion

Stefan_Linck's avatar
10 years ago

Pre-Command Timeout with PsExec

Hi,

I try to run a pre command on a backup job. The pre command is running on the Backup server but has to stop a service on a remote server. This is the command:

C:\Temp\PsTools\psexec.exe \\<server name> NET STOP <service>

I always run into a time out and I don't know why! I use an up-to-date BE 2014 on Windows server 2008 R2. Target server is 2012 R2. I can see the PsExec process starting in the task manager. But it never finishs. When I run this command from a command line it works perfectly fine. But not as a Backup Exec Pre Command.

Are there any suggestions on this issue?

Thanks a lot in advance - Stefan.

2 Replies

  • Hello Stefan,

    I was able to execute on the remote server a client installation batch file using exactly this command.

    Perhaps you can use it too.

    Best regards, 

    Cruisen

    For executing the batch in local mode from remote serveur : psexec serveur -s -w "C:TEMPx64" "C:TEMPx64silentclient.cmd" 

     -s         Run remote process in the SYSTEM account (use with caution).
    -w directory Set the working directory of the process (relative to the remote computer).
  • Thank you!

    I just found another solution which is

    sc.exe \\remoteserver stop "service name"

    Works like a charm!

    Best regards - Stefan.