I have a command that loads a filtered list of servers into a variable:
$Computers = Get-adcomputer -filter "OperatingSystem -notlike '*server*'" -properties * |Where-Object {$_.LastLogonDate -gt $time -and ($_.Enabled -eq $true) -and ($_.name -ne 'Rose*')} |select name
And I want to use a For each loop to do stuff with those computernames. When I just put the command in I get a list with "name" at the top and a list of computernames
But when I use a Write out the contents of $Computer in loop I get a list of @{name=Computer1}
What is going on? Why can't I get a clean array of computers to work with?