Are you connected to multiple vCenters, or are your vCenters configured in LinkedMode?
Try adding the Server parameter on the cmdlets, that way you can specify exactly which resource on which vCenter you want to retrieve.
2 vcenter in linked mode yes, but that's not the problem as i connect-viserver to one vcenter server.
i have 2 cluster with a resourcepool called 'abc' (customername) on one vcenter
and 2 datacenter with a vm-folder called 'abc' (customername) on the same vcenter server
if the linked vcenter mode would be a problem, get-resourcepool -name $customer would result in 4 resourcepools due to the other vcenter is a "mirror" of the first.
Then you can retrieve the correct ones by starting from the top of the path.$rp = Get-Cluster -Name <cluster> | Get-ResourcePool -Name 'abc'
$folder = Get-Datacenter -Name <dc> | Get-Folder -Name 'abc'