Event Log

Get-EventLog -List | select -ExpandProperty Entries | select -ExcludeProperty Message

Index Time EntryType Source InstanceID Message


14787 Sep 11 08:16 SuccessA… Microsoft-Windows… 1102 The audit log was cleared…

How can i get rid of the Message contents to save in a csv file for later use?

Get-EventLog -List | select -ExpandProperty Entries | select * -ExcludeProperty Message

Took you almost 30 minutes to tell me to put a * ??
what kinda response time is this?
Seriously tho thank you

No worries. To be honest when I first read the question I didn’t read it well and thought you just had a type-o trying to exclude the messages rather than expand them. Then after figuring out that I miss-read, I have to validate the * did what it needed. Basically you have to tell select what to include before you can exclude.