I'm trying to create a PowerShell Cmdlet that runs daily and shows me the errors that occured on the previous day.
I can make it show the last 100. Instead I'd like to see just the one that occured the day before.
get-eventlog
-logname application
-newest 100 |
select eventid,machinename,entrytype,message,source,timegenerated,username |
export-clixml C:\Logs.xml