I am using PSExec to run scripts on multiple computers and after a few computers I start getting connection errors (probably because of concurrent connections limit on Windows 10).
PSExec command I am currently using:
psexec.exe @pc_list.txt -h -u psexec_username cmd /c "\\win10pc\path\script.cmd"
In the scripts I use pushd command to map the path to script/installer location, run installer if applicable and close with popd.
setlocal EnableDelayedExpansion
pushd "%~dp0"
if "!current_version!" neq "!new_version!" (msiexec /i "!installer!" /qn /norestart)
popd
endlocal
How can I close the connection after script ends on one computer and PSExec starts connecting to the next computer in the queue?
0 Answers