I have tried this script numerous times, but it doesn't quite work. It opens the Infopath form, sleeps for 10 seconds, closes it, opens the next one, etc., and completes the script. But it is not actually printing the form. I've tried it by setting my default printer to PDF, or just leaving it as a real printer. By putting a -noexit command at the end, I can view the messages on the screen when the script is complete, and they state that the forms were printed successfully. I'm not getting any error messages.
Am I doing something wrong? Once the Infopath form is displayed and open on the screen, it seems like the printing part would be easy. But I think the Printout() command is not working as expected.
I'm using Windows 7 Pro at work, Powershell Version 1.0.
Thanks for any advice!