I am new to powershell, trying to teach it to myself. I am trying to write a script that pulls a list of servers from a text file and pipes the results to the remove-item cmdlet. Once the get-content cmdlet has supplied the information I am trying to go to each server on the list of servers and access the C:windowstemp folder and delete only certain files. This is what I have so far. There are many different files with the same name just different extension that need to be cleaned out.
get-content C:scriptsServerList.txt | remove-item C:windowsTemp -include File.*
I know this will not work, but it is a starting point.
Please help.
Thanks Jim