Get-Member doesn’t always show you what is under the hood for an object. For that you need the .PSObject property. Here PSObject.Properties contains CSV column names
$data = Import-Csv -Path $csvfile $ColNames = ($data[0].psobject.Properties).name $ColNames