send the results of a batch file or process via email
Posted on 2016-08-04
Hello, I have a need to have my simple batch file send me an email of the result query when ran on a scheduled task.
The batch file is a simple dir command of a few folders to verify the files are up to date which is critical in case of downtime, adding the results to a email instead of having to manually run and view the results would help us in this process.
The batch file is a .bat so my question is, do I move the commands to list the files of a folder to a powershell script and build off a email send or do I build a separate powershell script to run the batch and email the results? or do I do something completely different to get me a automatic daily email with the file time stamp results of a directory