Print a file with the windows default printer

Description

A locally saved file should be printed using the windows default printer.

Solution

Use the Start-Process commandlet with the -Verb Print option:

$document = "C:\<YourFolder>\<YourFile>"
Start-Process -FilePath $document -Verb Print -Wait
  • Define the file that should be printed
  • Start the process to print the file and wait until the process finishes

Remarks