I tried to automate batch printing pdf files that I saved on a shared folder. I did not want to use hot keys to do this because it is very time consuming. So I tried to use powershell , I found a solution on the forum that did not work for me at thread to the link Print all files in a folder
They recommended using “print /d:<ServerName> filename” in invoke powershell but it did not work, I tried every way of passing as parameters, escaping quotes but failed. Finally I used “Start-Process” and its arguments which worked but I didn’t like the fact that Start-Process does not give you a standard error or success output and requires extra logic for closing Acrobat after print.
So I finally made Print work but I don’t understand how this is working… so I am passing device name as parameter name and file name as value of that parameter. Its like that invoke code is serially reading these values and running them. If I try to create 2 separate parameters for filename and device , it does not work!
This gave me major headache!
![image|690x142]