Automation

 View Only
  • 1.  new-tagassignment returning tag with id not found

    Posted Dec 04, 2013 09:06 PM

    Hi,

    I am using powercli 5.5.R1 and want to sign tags against VM in a vCenter 5.1 environment.
    Retrieving tags with get-tag works fine but I cannot assign tag.

    new-tagassignment -tag $mytag -Entity $vm returns an error that states the specified tag with id "InventoryServiceTag-<somenumber> was not found.

    Does this not work against 5.1 environments?



  • 2.  RE: new-tagassignment returning tag with id not found

    Posted Dec 06, 2013 04:42 PM

    Tagging works in both 5.1 and 5.5.


    From the error message, is it possible the Tag you are trying to assign has not been created in the 5.1 environment yet?



  • 3.  RE: new-tagassignment returning tag with id not found

    Posted Dec 08, 2013 11:54 PM

    The error states that the tag with ID was not found but when I run 'get-tag mytagname | select id' it returns the same id as the one the error is complaining about.
    This tells me that the tag exists. Tried this for several other tags but same issue



  • 4.  RE: new-tagassignment returning tag with id not found

    Posted Feb 14, 2014 06:24 PM

    Try this

    $myTag = Get-Tag "Server 2003"

    $myVM = Get-VM

    foreach ($vm in $myVM) {

        New-TagAssignment -Tag "Server 2003" -Entity $VM.name

    }



  • 5.  RE: new-tagassignment returning tag with id not found
    Best Answer

    Posted Mar 04, 2014 06:48 AM

    For those interested, VMware Support has told me that there is an issue with this if vCenters are configured in linked mode.
    This should be fixed in an upcoming release