Does this work for you?
$VMs = Get-VM
$Report = @()
foreach ($VM in $VMs){
$Tools = $VM.ExtensionData.Guest.ToolsStatus
$dns = $VM.ExtensionData.Guest.Hostname
$Report += New-Object PSObject -Property @{
VM_Name = $VM
Tools_Status = $Tools
DNS_Name = $dns}
}
$Report | select VM_Name,Tools_Status,DNS_Name
$Report | select VM_Name,Tools_Status,DNS_Name | Export-Csv C:\scripts\listvm.csv -NoTypeInformation