powershell with LPR Command multiple printer

This topic contains 3 replies, has 2 voices, and was last updated by  Xeon 1 year ago.

  • Author
  • #64831


    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 🙂

  • #64834

    Don Jones

    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.

  • #64846


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

  • #66675


    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

You must be logged in to reply to this topic.