Printing All PDF or Word Documents in a Folder to Any Printers At Once

One of the questions I’ve been asked quite often is how to print all these documents from a folder at once without opening them one by one. While I used a few methods to accomplish this task in the past, I found one of the easiest ways is to use the power of the PowerShell.

To print all PDF files in my H: drive to the default printer, you can simply open PowerShell console and run the following command.

Get-ChildItem "H:*.pdf" | 
ForEach-Object {Start-Process $_.Name -Verb Print}

If you have PDF files in the sub folders that you also want to print, add -Recurse for the Get-ChildItem cmdlet.

To print all Word documents, simply replace *.pdf with *.docx.

What if I want to print to a different printer, use PrintTo follow by the full printer name, such as

Get-ChildItem "H:*.pdf" -Recurse | 
ForEach-Object {Start-Process $_.Name -Verb PrintTo "\ServerPrinter1"}

What’s even better, the following code lets you choose which printers to use and you can even pick multiple printers and send documents over. That’s right. You can print all your PDF files from one location to multiple printers to get multiple copies all from one PowerShell command.

Get-Printer | Out-GridView -OutputMode Multiple |
ForEach-Object {
$printname = $
Get-ChildItem "H:*.pdf" -Recurse |
ForEach-Object {Start-Process $_.Name -Verb PrintTo $printname}

When you run the code, a dialog box pops open with all printers installed on your computer. Select one or more by holding down the CTRL key, and click OK to print all documents to the selected printers.


Related Post

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.