#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.

About the author: Ravikanth C

Ravikanth is the founder and editor of the PowerShell Magazine. He is also a PowerShell MVP who works at Dell Inc. He blogs at http://www.ravichaganti.com/blog and you can follow him on Twitter @ravikanth.

Related Posts

%d bloggers like this: