Hi,
I am able to get the details for VM’s from ESX host using the below script:
Get-VM | `
ForEach-Object {
$Report = “” | Select-Object -property Name,NumCpu,MemoryMB,Host,IPAddress
$Report.Name = $.Name
$Report.NumCpu = $.NumCpu
$Report.MemoryMB = $.MemoryMB
$Report.Host = $.Host
$Report.IPAddress = $_.Guest.IPAddress
Write-Output $Report
} | Export-Csv “C:\VM.csv”
I am not able to pull servers from a text file & query the above script.
-Kalyan