get-vm | select name, host, powerstate, MemoryMB, numCPU | export-csv c:\vm_info.csv
get-vm | get-vmguest | select VMname, IP Address, hostname | export-csv c:\vm_info2.csv
Ok, there's a few ways to do this. Here is what I would do. You can take advantage of the fact that each VM object has a Guest property which is the very same thing as what is returned by the Get-VMGuest cmdlet. Or you can use the cmdlet actually, either way, doesn't matter. The point is that you will add members (properties) from both places using what's called the calculated properties feature of select-object (and a few other cmdlets can do it as well).
While you could actually do the whole thing in one line, the end result is some funky looking column names in your CSV file. In order to have nice column names, you have to do a bit more work. When you use calculated properties with Select-Object, you can provide both a Name for the column and an Expression which is executed. Looks like this:
$IPprop = @{ Name = "IP Address"; Expression = { $_.Guest.IpAddress } }
$HostNameProp = @{ Name = "Hostname"; Expression = { $_.Guest.Hostname } }
Get-VM | select name, host, powerstate, MemoryMB, numCPU, $IPprop, $HostNameProp | export-csv c:\vm_info.csv
[PowerShell MVP|https://mvp.support.microsoft.com/profile=5547F213-A069-45F8-B5D1-17E5BD3F362F], VI Toolkit forum moderator
Author of the upcoming book: Managing VMware Infrastructure with PowerShell
Co-Host, PowerScripting Podcast (http://powerscripting.net)