`Hi,
My execution on multiple remote computers as follows.
-
Kill Java process
-
Copy files to specific location
-
Run application specific batch
Below script works as expected. But How can i run it parallelly. Also,**pskill64 ** establishing connection each time when it executes. It takes time to complete above mentioned steps.
Below script works in sequential mode. How can we run on multiple remote machines at a time?
``@echo off
set uname=domain\admin
set pword=
FOR /F "tokens=* delims=" %%i in (**list1**.txt) DO (
pskill64 \%%i -u %uname% -p %pword% java.exe
pskill64 \%%i -u %uname% -p %pword% javaw.exe
pskill64 \%%i -u %uname% -p %pword% edge.exe
xcopy \%%i\C$\Users\tcserv\Downloads\PSTools\fileToBeCopied.txt \%%i\D$\APP\APPRoot\Runtime
NET USE %%iD$TC143TRportal /u:%uname% %pword%
psexec64 %%i “D:APPAPPRootRuntimeregister.bat” )“
New contributor
Swamy is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.