Using the Output-Printer Cmdlet

Printing Returned Data

Yes, we’ve all heard of the paperless office; in real life, however, people still need to print things. For example, do you need to print the results of a Windows PowerShell cmdlet? Then pipe those results into the Output-Printer cmdlet:

Get-Process | Output-Printer

Without any additional parameters Windows PowerShell will print to your default printer. However, you can print to any printer to which you have a connection simply by including the printer name as an optional parameter. This command prints process information to the printer named IT Department Printer:

Get-Process | Output-Printer "IT Department Printer"
Output-Printer Aliases
  • lp