We are looking for some help on the "Find-VBRViEntity" PowerShell command.
We use this to query all servers registred for each virtual center.
I have created the following example script to demonstrate the problem.
We are seeing this on some servers with Veeam 9.5.0.1038 but only sometimes.
Our questions on this:
* can someone reproduce this or already know this issue
* on what is the message "Sequence contains no elements" referring? All variables used in the call are filled
Any help is appreciated
Example script
Code: Select all
Add-PSSnapin -Name VeeamPSSnapIn #-ErrorAction SilentlyContinue
$VCs = Get-VBRServer -Type VC
foreach ($vc in $VCs){
write-host "vc" $vc.Name
write-host "type" $vc.Type
$servers = Find-VBRViEntity -Server $vc -Servers
foreach ($server in $servers) {
write-host $server.name
}
}
Error message
Code: Select all
Find-VBRViEntity : Sequence contains no elements
At C:\Users\Administrator\Desktop\test\forum-list-esx.ps1:5 char:53
+ $servers = Find-VBRViEntity -Server $vc -Servers
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Find-VBRViEntity], InvalidOperationException
+ FullyQualifiedErrorId : System.InvalidOperationException,Veeam.Backup.PowerShell.Cmdlets.FindVBRViEntity
Best wishes
Stefan