When I run Get-EventLog -List, I get 5 columns in the result. I only want 2 of them (Log and Entries). This sounds simple, but I can’t seem to get it to work. When I pipe it to Select-Object (Get-EventLog -List | Select-Object Log, Entries), I get something different in the entries column.
That’s PowerShell being a little too helpful. The default columns you see from the formatting system don’t match up with the actual properties on the object. The Entries property is actually a collection, but the default view for those EventLog object is showing you an entry count instead. This works: