Nice addition for environments with local datastores (presumably unused, so not wanted in the results), LeaV97.
A note about that: there is also the option to add a -Filter parameter to the initial Get-View command. It does not make much of a speed difference in this example, but there are situations where that method would be preferable (for speed and for memory usage benefites).
Using -Filter on Get-View results in the filtering taking place on the server side, so the "unwanted" objects are not even returned to the PowerCLI session, whereas going the Where-Object route filters out objects on the client side, _after_ they have already been returned to the client, and the time/memory price has been paid. Just wanted to add that tidbit.