Event Log

Welcome Forums General PowerShell Q&A Event Log

This topic contains 3 replies, has 2 voices, and was last updated by

 
Participant
3 years, 4 months ago.

  • Author
    Posts
  • #29691

    Participant
    Points: 0
    Rank: Member
    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?

  • #29693

    Participant
    Points: 0
    Rank: Member
    Get-EventLog -List | select -ExpandProperty Entries | select * -ExcludeProperty Message
    
  • #29694

    Participant
    Points: 0
    Rank: Member

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

  • #29700

    Participant
    Points: 0
    Rank: Member

    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.

The topic ‘Event Log’ is closed to new replies.