I've got the below
Get-EventLog -LogName * -After (Get-Date).Adddays(-7)
Which returns the information I require:
Now when I export this information out with
Export-Csv c:\temp\$([Environment]::MachineName).csv
It returns the following under the entries section in my CSV:
System.Diagnostics.EventLogEntryCollection
I will be running this on multiple servers and collecting all logs into one area.
So Now I have changed the information to be a bit more specific
Get-EventLog -LogName * -After (Get-Date).Adddays(-7) |
Select-Object MachineName, Log, Entries |
Export-Csv -NoTypeInformation c:\temp\$([Environment]::MachineName).csv
This now returns the below when I'm exporting out to a CSV:
But I can't see the amount of entries I require. Is there a work around for this?