Solved
Forum Discussion
Chris_Grant
Mar 08, 2016Employee
I am assuming you actually have a server after the @. I suspect what's happening is that you are running sleep on the windows server, rather than the \scriptname.ps1 file. Try something like this:
GROUP=$1 ACCOUNT=$2 ssh Administrator@ "\scriptname.ps1 -group $Group -account $ACCOUNT"
SSH should take care of the delay while logging in and the exit on completion of the command natively.