0

I'm using pstools to shutdown local pcs .. with different user & pass

psshutdown \\10.0.0.1 -u 1 -p 1 psshutdown \\10.0.0.2 -u 2 -p 2 psshutdown \\10.0.0.3 -u 3 -p 3 

problem is : if one of them is down the batch take a lot of time to move to the next one ... How can i skip to the next command after some time .. or but it in a loop ... Any ideas ?

1
  • 2
    Upgrade to using Powershell, use one of the various runspace implementations that let you mutlitask and run many commands in parallel? Commented Apr 17, 2017 at 23:26

1 Answer 1

0

According to the docs, you can set a timeout for connecting to the remote machine with the -n <seconds> option:

psshutdown \\10.0.0.1 -u 1 -p 1 -n 5 

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.