I have power shell script below where I am trying to convert the csv file into an html file but it does not work. i would like it to send me an email daiyl using scheduled task but it does not work as it does not convert the csv file into an html file so what am I doing wrong.
Get-Eventlog -log system -after ((get-date).addDays(-1)) -EntryType Error, Warning | export-csv | convertto-Html | set-content C:\temp\sysevents.html