Hi Guys.
Has anybody got a good way of listing VMs via resource pool? I am not sure if I should do something like:
Get-VM | Get-View and drill down until I get the resource pool. But usually It lists the resource pool ID
Or is there a better way?
Thanks
John
Thanks kunaludapi
Its just a slow day for me, I forgot that you can just
Get-VM | Select Name, Parent.
Since the thread is open, is there another way round. List vms in a resource pool.
get-vm | select name, @{n="ResourcePool"; e={$_ | Get-ResourcePool}}
Thanks kunaludapi
Its just a slow day for me, I forgot that you can just
Get-VM | Select Name, Parent.
Since the thread is open, is there another way round. List vms in a resource pool.
Get-VM | Select Name, ResourcePool
If you want to retrieve the VM's in a specific resourcepool, you can use the command from the following example, that lists all of the VM's in resoucepool rp1:
Get-ResourcePool -Name rp1 | Get-VM
RvdNieuwendijk wrote:
If you want to retrieve the VM's in a specific resourcepool, you can use the command from the following example, that lists all of the VM's in resoucepool rp1:
Get-ResourcePool -Name rp1 | Get-VM
This is the correct way to get all of the VMs from a particular resource pool.