powershell with LPR Command multiple printer

Hi,
I am New in PowerShell, and i am trying to get this working, from a machine i would like to print the same file on multiple printer,
so i used this Command to send the print to only a printer, and its works
lpr -S Printeripadress -P raw filetoprint.txt
i would like to create a text file with the ip of all the printer that i have,
and send the print to this printer list. one after the other.
Please Help :slight_smile:

foreach ($name in (Get-Content names.txt)) { assumes names.txt is one name per line
lot -S $name -P raw filetoprint.txt
}

Or something like that, I would imagine.

it works like charm! thank you Very much Mr! and that was very quick!

Hi All, all is good with this script,i am just thinking if it can diplay on the powershell terminal the current ip where the print is going?
thanks in advance