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

psshutdown \\  -u 1 -p 1
psshutdown \\  -u 2 -p 2 
psshutdown \\  -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 ?

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

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

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.