Unable to Find Default Resource Pool

PowerShell script exchange

Unable to Find Default Resource Pool

Veeam Logoby rudy » Wed 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/cannot-find-resource-pool-t19146.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.
rudy
Lurker
 
Posts: 2
Liked: never
Joined: Wed May 06, 2015 9:08 pm
Full Name: Rudy Bartel

Re: Unable to Find Default Resource Pool

Veeam Logoby v.Eremin » Thu 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.
v.Eremin
Veeam Software
 
Posts: 13290
Liked: 973 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: Unable to Find Default Resource Pool

Veeam Logoby rudy » Thu 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.
rudy
Lurker
 
Posts: 2
Liked: never
Joined: Wed May 06, 2015 9:08 pm
Full Name: Rudy Bartel

Re: Unable to Find Default Resource Pool

Veeam Logoby v.Eremin » Fri 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.
v.Eremin
Veeam Software
 
Posts: 13290
Liked: 973 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin


Return to PowerShell



Who is online

Users browsing this forum: Yahoo [Bot] and 8 guests