Simple reomte execution via loop

hello all, looking for your help for a very simple procedure as so…

need to:
1 run through a list of computers
2 if ‘ping ok’ (if not ok print error msg…)
3 copy files from my computer/server TO remote computer
4 execute copied files remotely on remote computer

for stage 4 -
i run this line:
psexec msiexec.exe /i “c:\temp\app.msi” silentfile=c:\temp\install.ini /QR /L*v “C:\temp\install.log”
and it works fine (as long as the files exist on remote computer)
but i can’t figure how to make the ping check & copy stages.

thanks for your help
nir

What kind of help do you need?

You may start with reading the help for the following cmdlets to get you started. You should read them completely including the examples to learn how to use them:

That’s actually all you need to accomplish your task.

thank you i will look into that.
help i needed was to put it together as the execution runs (with psexec, as with invoke-command it didn’t for some error)

thanks anyways

Errors are an important feature of every programming or scripting language. If you get some errors and you want to get help to solve them you should post them completely along with the code you used. Both of this - errors and code - you should format as code using the preformatted text button ( </> )

Thanks in advance.

thank you friends,
i read the docs… fixed the code… it works now!

all best,