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