ForEach loop different in v2 and v3

by Pat Richard at 2013-05-09 16:24:17

This works fine in v2:
$feServers = Get-CsComputer -Pool $Pool | Sort identity
# $feservers
ForEach ($server in $feservers){
Write-Host $server.identity -ForegroundColor yellow
}


but when running it on a machine with v3, I get no results. However, $feservers does have the same contents. It’s just the foreach loop that’s not returning the info.

What am I missing?