Is your input file really a CSV? If it is, the first line will be a "header" that contains the column names and not the name of a computer.
Assuming you have a CSV and that there's a column named "Hostname", try this:
Import-CSV c:\servers.csv |
ForEach-Object{
$os = Get-WmiObject -ComputerName $_.Hostname -Class Win32_OperatingSystem |
select-object CSName,Caption,BuildNumber
Try{
$psver = Invoke-Command -ComputerName $_.Hostname -Scriptblock {$PSVersionTable.psversion.Build} -ErrorAction STOP
}
Catch{
$psver = "Not Found: $_"
}
Add-Member -InputObject $os -MemberType NoteProperty -Name PSVersion -Value $psver
$os
} |
Export-CSV C:\output.csv -NoTypeInformation
Also, your code won't export anything because you aren't feeding the Export-CSV any data.