Send A Text File to Mulitple Printers in PowerShell

If you ever need a way to send a text file to multiple printers for testing or whatever the purpose, here is one for you.

$printers = @('Printer-1', 'Printer-2', 'Printer-3', 'Printer-4', 'Printer-5')
ForEach ($printer in $printers){
    $printer = '\\printer-server\' + $printer
    Get-Content 'h:\test-printer.txt' | Out-Printer $printer
}

The nice thing about this is, that you don’t need any of these printers to be installed to make it work. You can even schedule it as a scheduled task if you like.

Leave a Reply

Your email address will not be published.