Tuesday, July 28, 2015
How to Send to a Printer in PowerShell (5 Steps)
Click the 'Start' button on the Windows 7 taskbar and select All Programs. Click Accessories. Click the Windows PowerShell folder and then select Windows PowerShell in the menu that appears.
Type 'cd /directory_path_of_file_to_print/' at the command prompt, replacing '/directory_path_of_file_to_print/' with the actual path to the file you wish to print. (Don't include the quotation marks in this command.) Press the 'Enter' key.
Enter 'type my_document.txt | out-printer' on the command line, replacing 'my_document.txt' with the name of a file you wish to print, and press the 'Enter' key. The contents of the file will print to the Windows 7 computer default printer.
Type ''this is a test' | out-printer' at the command prompt and press the 'Enter' key. The text typed inside the quotes (in this case 'this is a test') will print to the default printer configured on the Windows 7 computer.
Enter 'type my_file.txt | out-printer --name \my_printer\' on the command line, replacing 'my_file.txt' with the name of a file you wish to print and replacing 'my_printer' with the name of a printer other than the Windows 7 computer default printer. Press the 'Enter' key and the file specified will be printed to the printer named in the command line.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment