Link to home
Start Free TrialLog in
Avatar of sunil cherukuri
sunil cherukuriFlag for United States of America

asked on

Batch Script to run on multiple remote machines

Hi Team,

Can somebody help me with a batch script that i can install Ransonware patch on 100's of machines remotely using PSEXEC by placing all machines in single text file. In our organization WinRM service is stopped on all devices, hence i can't use powershell script. Also i need to copy PsTools onto remote machines to run the patch by using PSEXEC.

Based on above scenario can somebody provide me batch script that i can copy PsTools, KB File onto machines remotely & run using psexec.

Thanks in advance.
Avatar of Chirag Nagrekar
Chirag Nagrekar
Flag of India image

Where is your batch file located ? Is it available on servers local drive ? If yes then run below script for powershell.

 psexec \\ -u username -i -d cmd /c drive:\folder\program_copy.bat

Drive: is where your batch file on local system's drive.

If it is not available and you want to push remotely then you can use group policy to map network path of that script and run above script.

Hope this helps.
Avatar of Adam Leinss
Adam Leinss
Flag of United States of America image

Link to home
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial