I need to create a PowerCLI script, to find all VMs in a specific IP range (e.g. 172.26.x.x) within vCenter, containing the below:
This information will then been used in order to determine sufficient capacity as VMs reside on legacy hosts and so need to be migrated into a new cluster.
Any help would be very much appreciated?
You should be more specific about what exactly you want with vCPU/vRAM/VMDK "data".
Assuming you want basic inventory metrics, use something like this:
Get-VM | Where {$_.Guest.IPAddress -like '172.26.*'} | Select Name, NumCpu, MemoryGB, UsedSpaceGB | Format-Table -AutoSize
You should be more specific about what exactly you want with vCPU/vRAM/VMDK "data".
Assuming you want basic inventory metrics, use something like this:
Get-VM | Where {$_.Guest.IPAddress -like '172.26.*'} | Select Name, NumCpu, MemoryGB, UsedSpaceGB | Format-Table -AutoSize