Hi,
I have 2 Vcenter 5.1 in LinkedMode having the same TAGs defined in each vCenter.
I noticed that executing a Get-Tag in a PowerCli windows connected to 1 of the vCenter, TAGs from both vCenter are listed: TAGs with same name are then listed twice.
Now the issue is that using the New-Tagassignment -Tag will fail with error message:
New-TagAssignment : 11/29/2013 12:22:18 PM New-TagAssignment The specified parameter 'Tag' expects a single value, but your name critetia 'TOTO' corresponds to multiple values.
I have not been able to capture a unique value from Get-Tag that could be used after in New-TagAssignment.
Any help would be appreciated.
Thanks
The Tag parameter on the New-TagAssignment cmdlet expect a single object.
SInce you are running in multiple mode, the Get-Tag cmdlet returned at least 2 objects.
You should use the tag that is returned from the vCenter that also hosts the Entity that you want to use in the New-TagAssignment.
Do that by using the Server parameter on the Get-Tag cmdlet.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
I tried using the -Server parameter and specifying the vCenter the powercli is currently connected too and also where the VM is registered too: it does exactly the same error with mutliple value message.
Also if you do a Get-Tag -Server VC_hostname, you still have TAGs from both VCs listed.
Would it be a bug in these new TAG commandlet?
Could be. I'll see if I can reproduce this.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Hi Luc,
By any chance did you have time to reproduce it and confirm if it is a cmdlet issue or if the issue is in my environment?
No, I couldn't reproduce this, but then my VCs are not on the same version.
I'll have to schedule an update :smileygrin:
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference