hm, your script returns the excludes - but the ones where a VM still exist. And the exclude works as those VMs do not have any backup. I think it has to be $jObjects.Object.ObjectRef. But it still returns just all VMs, event the ones that are in $allVmIds. I see that it should work but it doesn't
Name Type ApproxSize Location
---- ---- ---------- --------
NDEISE030 Exclude 0 B s...
SDES0120 Exclude 0 B s...
SDES0160 Exclude 0 B s...
SDES0130 Exclude 0 B s...
SDES0170 Exclude 0 B s...
#> $allVmIds
Reference
---------
vm-1378051
vm-3910277
vm-3922146
vm-3910276
...
#> jObjects
Name Type ApproxSize Location
---- ---- ---------- --------
NDEISE030 Exclude 0 B s...
SDES0120 Exclude 0 B s...
SDES0160 Exclude 0 B s...
SDES0130 Exclude 0 B s...
SDES0170 Exclude 0 B s...
#> $jObjects.Object.Reference
- empty -
> $jObjects.Object.ObjectRef
vm-1378051