0

#PSTip Print a Word document using the Start-Process cmdlet

Note: This tip requires PowerShell 2.0 or above.

In an earlier tip, we saw how we can get the supported verbs for a given file type to use with Start-Process cmdlet. In this tip, I will show you how to use these verbs in an interesting and useful way.

PS> Start-Process -FilePath "C:\Documents\Test.Docx" -Verb Print

Isn’t this simple? With a simple one-liner, we can print a Word document to the default print device.

Filed in: Columns, Tips and Tricks Tags: ,

Leave a Reply

Submit Comment

© 2016 PowerShell Magazine. All rights reserved. XHTML / CSS Valid.
Proudly designed by Theme Junkie.
%d bloggers like this: