vSphere 6.5
I'd like to organize my VMs using folders named after business groups. Because we have multiple data centers, same folder name will appear more than once under vCenter. For example, a "IT" folder will appear at every data center. Because of the amount of VMs I need to move, I try to use PowerCLI to move them but I have a hard time telling it to move to the "IT" folder in the data center it's in.
PowerCLI C:\> Move-VM "it1" -Destination "IT"
Move-VM : 2/27/2019 4:28:59 PM Move-VM The specified parameter 'Destination' expects a single value, but your name criteria 'IT' corresponds to multiple values.
How do I make it recognize it's the "IT" folder in the data center the VM is in? I was trying to use Get-Folder to find the unique ID for the folder but I still can't tell which "IT" folder in the output is for the particular data center.
Thanks,