How to print email and it's attachment to a printer in batch, vbscript or powershell?

Environment, on a Windows 8 computer.
Outlook is not installed on that computer.
Exchange 2010 is ion the server.

From a local network,....

From a command line, I would like to do the following either in batch, vb script or powershell:

1.  Send an email, with a an attachment to a printer.  The printer output should be the email itself, plus the attachment.


2. Check a path to see if a document exists, if it does then send the document to the default printer to print.
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Bill PrewIT / Software Engineering ConsultantCommented:
What is the type of the "document", is it a TEXT file, of a WORD document, or something else?  If WORD, then is OFFICE installed on that computer?

100questionsAuthor Commented:
Hi Bill, it's actually a .txt file..
Office is not installed on the computer.
Bill PrewIT / Software Engineering ConsultantCommented:
Okay, in this case, you can do something like this at a command line, or in a BAT script:

if exist "c:\temp\mydoc.txt" start /min notepad /p "c:\temp\mydoc.txt"

Open in new window


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Bill PrewIT / Software Engineering ConsultantCommented:
That's odd, when I run it here Notepad exits after it prints.

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft DOS

From novice to tech pro — start learning today.