Hi,
I am running a script using Task Scheduler, it's all working when I manually run it but it seems to be hanging when it's run using Task Scheduler. The last 3 lines of code are the following
send-mailmessage -to "ToUser <bennettj@rsc.org>" -from "TFS CS Alerts <NoReply.TFSAlerts@rsc.org>" -subject $subjectcontents -body "Subject" -attachment $genericLogFile
-SmtpServer agate@mail.com
#Clean Up
#set-location $outputfolder
remove-item -path e:\scripts\FTPDownloads\*
remove-item -path $remoteServerTemp"\*"
I never recieve an email and the files that are supposed to be removed don't get removed either.
Does anyone know a way to debug the timeout as I can't obviously get to the console..
Thanks
Alter De Ruine