Like this?
$clusterName = 'cluster'
Get-Cluster -Name $clusterName -PipelineVariable cluster |
Get-VMHost -PipelineVariable esx |
ForEach-Object -Process {
$netSys = Get-View -Id $esx.ExtensionData.ConfigManager.NetworkSystem
Get-VMHostNetworkAdapter -VMHost $esx -Physical -Name vmnic* |
Select @{N='Cluster';E={$cluster.Name}},
@{N='VMHost';E={$esx.Name}},
@{N='Nic';E={$_.Name}},
@{N='VlanIds';E={($netSys.QueryNetworkHint($_.Name)).Subnet.VlanId -join '|'}}
} | Export-Csv -Path .\report.csv -NoTypeInformation -UseCulture