Change the 1st line
$output=foreach ($esxiinGet-VMHost|SortName)
into
$output=foreach ($esxiin GetCluster -Name "os 01" | Get-VMHost|SortName)
Change the 1st line
$output=foreach ($esxiinGet-VMHost|SortName)
into
$output=foreach ($esxiin GetCluster -Name "os 01" | Get-VMHost|SortName)