PowerShell script exchange
Post Reply
rudy
Lurker
Posts: 2
Liked: never
Joined: May 06, 2015 9:08 pm
Full Name: Rudy Bartel
Contact:

Unable to Find Default Resource Pool

Post by rudy » May 06, 2015 9:30 pm

Hi,

I'm having issues finding our default resource pool "Resources" using the PowerShell commands in 8.0. My issue is similar to the one reported here http://forums.veeam.com/powershell-f26/ ... 19146.html but the resolution posted there doesn't work for me.

Here's what I'm trying:

Code: Select all

PS >Find-VBRViResourcePool -Server "esxi-host-name" -Name "Resources"
gives me nothing, just like in the above linked thread.

But if I try using Find-VBRViEntity as recommended:

Code: Select all

PS >Find-VBRViEntity -ResourcePools -Server "esxi-host-name" -Name "Resources"
I still get nothing.

If I specify the vCenter server:

Code: Select all

PS > Find-VBRViEntity -ResourcePools -Server "vcenter-server" -Name "Resources"

ConnHost  : Veeam.Backup.Core.Common.CHost
Type      : ResourcePool
Reference : resgroup-35515
Id        : 2b76455a-8337-44ae-9e33-8a1d197fef87_resgroup-35515
Name      : Resources
Path      : vcenter-server\datacenter-name\Resources

ConnHost  : Veeam.Backup.Core.Common.CHost
Type      : ResourcePool
Reference : resgroup-21
Id        : 2b76455a-8337-44ae-9e33-8a1d197fef87_resgroup-21
Name      : Resources
Path      : vcenter-server\datacenter-name\cluster-name\Resources
I get two results, one for the datacenter and one for the cluster.

How do I get it to only return a single result for a cluster?


Thanks.

veremin
Product Manager
Posts: 17119
Liked: 1480 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Unable to Find Default Resource Pool

Post by veremin » May 07, 2015 4:24 pm

You might want to use path as queering parameter to filter the results out:

Code: Select all

Find-VBRViEntity -ResourcePools -Server "vcenter-server" -Name "Resources" | where {$_.Path -eq "vcenter-server\datacenter-name\cluster-name\Resources"}
Thanks.

rudy
Lurker
Posts: 2
Liked: never
Joined: May 06, 2015 9:08 pm
Full Name: Rudy Bartel
Contact:

Re: Unable to Find Default Resource Pool

Post by rudy » May 07, 2015 11:17 pm

v.Eremin wrote:You might want to use path as queering parameter to filter the results out:

Code: Select all

Find-VBRViEntity -ResourcePools -Server "vcenter-server" -Name "Resources" | where {$_.Path -eq "vcenter-server\datacenter-name\cluster-name\Resources"}
Thanks.

Thanks for that. It solves my problem and is better than the workaround I was using.

veremin
Product Manager
Posts: 17119
Liked: 1480 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Unable to Find Default Resource Pool

Post by veremin » May 08, 2015 2:48 pm

Glad to hear my input was helpful. The matter of selecting appropriate entity among several ones is more about comparing their properties and using one of those as distinguishing factor. Thanks.

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests