How to Run Commands for Open Printers

The Windows Powershell interface lets you run commands on open printer ports either directly connected to the Windows computer or a network printer. The "Out-Printer" command prints to the printer, so you can send documents and other output to the printer without opening an application. The default drivers on the local computer are used to send the print job.

Instructions

    • 1

      Click the Windows "Start" button and select "All Programs." Click "Accessories," then click the "Powershell" program sub-group. Click the "Powershell" icon to start the utility.

    • 2

      Type the command to get the content and print it to the screen. This command lets you verify that you have the right content you want to use to send the commands to the printer. The following code displays a text file named "myfile.txt":

      get-content $pshome\myfile.txt

    • 3

      Send the print command to the printer. After you verify the text you want to send to the printer, add the "out-printer" option to your content. The following command shows you how to send the command to the printer:

      get-content $pshome\myfile.txt | out-printer

Related Searches:

References

Comments

Related Ads

Featured