Avatar of sunil cherukuri
sunil cherukuri
Flag 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.
Sunil.
Windows BatchWindows OS

Avatar of undefined
Last Comment
Adam Leinss

8/22/2022 - Mon
Chirag Nagrekar

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

 psexec \\computer.domain.com -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.
ASKER CERTIFIED SOLUTION
Adam Leinss

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck