Print from Powershell
Dan Wheeler
Posted on June 5, 2023
Run this in Powershell - substituting the <NAMEOFPRINTER> with the name of a printer installed on your machine (or remove it entirely to use default printer):
'Hello World' | Out-Printer '<NAMEOFPRINTER>'
To print a specific file, it's:
Get-Content 'C:\MyNote.txt' | Out-Printer '<NAMEOFPRINTER>'
Can also be used within PSEXEC to send prints from remote computers - obviously you'll need to specify the name of a printer which is actually installed on that computer.
💖 💪 🙅 🚩
Dan Wheeler
Posted on June 5, 2023
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.