On my Windows 2012 R2 server when I set the task to run my Powershell script with the "Run if user is logged in or not" and have the "Run with elevated permissions" the task does not run and get a (0x1) message. If I copy and paste the syntax into powershell it works fine.
1) Is see a number of post out there regarding the (0x1) exit code with Powershell and Task Scheduler. What is the trick to get this to work
2) My script geneates a CSV's file in a specific location. Will this be automatically over written daily?
3) What would be the easiest way to have all CSV files emailed to me? I believe powershell does have a send mail commandlet but have not used it before