I have .bat files that execute PowerShell scripts. They run fine from Task Scheduler or when running the batch files myself, but when I run them from Outlook (either from VBA script or using a Rule) - they just exit immediately without completing.
they look like this:
*PowerShell -file C:\Users\tenba1\Documents\Scripts\Account_Recon.ps1*
I also tried this:
*Call PowerShell -file C:\Users\tenba1\Documents\Scripts\Account_Recon.ps1*
Any idea why this happens?