Avatar of Aakash Aggarwal
Aakash Aggarwal
 asked on

USing loop in powershell to run different .exe files at different locations.

Please check the below screenshot.

The first command in powershell is running fine, however I need to run the same command for 8 different .exe files. I have mentioned the paths where I need to run the command.

Assist if any idea how I can put those in a loop and run the script for all simultaneously.
myscript.PNG
PowershellXML

Avatar of undefined
Last Comment
Aakash Aggarwal

8/22/2022 - Mon
ITguy565

@aakash It would be more helpful if you could paste your script content in code blocks rather than in a PNG format. This would make it faster to answer your question and not have to rewrite all the code.
ASKER CERTIFIED SOLUTION
ITguy565

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.
ITguy565

Changed the Code a little bit. I wasn't sure if you had an executable in "
invoke-script -Path "D:\InetPub\wwwroot\" 

Open in new window


If you don't just remove the line or comment it out.

Please note: I typed all that freehand so there are probably some typo's
Aakash Aggarwal

ASKER
Thanks
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes