Hi,
Is there any way or tool to export the information about the VM's from v Center server?
In the Datacenter under Virtual Machines tab we get to see the details of Virtual machine like Ip, on which host it is powered On, Memory, CPU Count etc. I need these info to be exported.
Any help?
With PowerCLI you can export all the information about virtual machines. Something like:
Connect-VIServer YourVIServerName 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 = ($_ | Get-VMGuest).IPAddress Write-Output $Report }
You can easily extend this script to get more information. If you have any questions about PowerCLI you can go to the VMware vSphere™ PowerCLI Community.
Robert
Try RV Tools
Hi,
The script when it run output the name,cpu,mem, host and Ip but when I try to export the IP alone doesnt get exported....
below is the script that i ran...
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 = ($_ | Get-VMGuest).IPAddress
Write-Output $Report
} | Export-Csv "C:\VM.csv"
karthik
I changed the script a little bit. Now it returns the IP address also:
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"
Robert
Hello.
In the vSphere client, connect to the vCenter server. Select the Datacenter, Cluster or Host with the virtual machines you want in it. Click the "Virtual Machines" tab. Right-click any column to select the viewable columns. When you have all the information you want, go to File -> Export -> Export List and save it.
Good Luck!