ForEach vs Select-Object -ExpandProperty

Quite often I see scripts which use a ForEach loop to expand an array in an array and display that as a list. There is nothing wrong with that, however, another method is using 'Select-Object' with the 'ExpandProperty' option. To illustrate, here is an example: ' I want to have a list with cluster and their datastores, … [Read more...]