If you change the line:
$row | Add-Member -Type NoteProperty-Name$NIC_vSwitch-Value$vNic.NetworkName
into:
$row | Add-Member -Type NoteProperty-Name$NIC_vSwitch-Value ($vm_name | Get-NetworkAdapter | Where-Object {$_.MacAddress -eq$vNic.MacAddress}).Name
then it will also work for vSphere 4.