We have 5 vCenters and it can be a challenge to find a VM at times. I'm making a script that connects to each vCenter then I'm trying to find a 'get-vm' command that will pull the vCenter that the VM is in. But I'm not able to find this. Can anyone tell me with PowerCli, how I can pull the name of the vCenter a VM is in?
Are you able to retrieve this information quickly when needed? I love the clean output.
I am working on a function that parses the result of this: get-vm <VM> | select Uid