Author Posts

August 24, 2015 at 5:19 pm

Here is my elaborate program:

get-eventlog -LogName Application -Newest 5 | Format-Table -GroupBy Source

My goal is to GroupBy Source, but not SHOW source columns in each group because its redundant information. Now I'm aware of select-object and -excludeproperty but it doesn't seem to work unless I manually specify the columns to select first. If I do that, then when it pipes to format-table from Select, 'Source' no longer exists and therefore cannot be grouped anymore. Is there a way to do this? I basically want to group by a property but not show that property

August 25, 2015 at 1:34 am

get-eventlog -LogName Application -Newest 5 | Format-Table -GroupBy Source -Property Index, Time, EntryType, InstanceID, Message

August 25, 2015 at 9:02 am

Shoot, that was easy. thanks