Hi Guys, The attached script collects logs from various servers on my network, prints them into logs.txt, and emails them to me, daily. When I run the compiled script by clicking on the EXE it works beautifully. However, when it's run through the scheduler, I get an email with a blank txt file. This happens when I run the scheduled task manually and when it runs automatically. The SMTP part is from Jos, Thank you Jos. #region Logs retriever $log = "log.txt" If FileExists($log) Then FileDel