Automation

 View Only
  • 1.  Copy tags from 1 vcenter to another

    Posted May 20, 2022 10:46 AM

    Im trying to copy all Tags from 1 vCentre to another, while my script works it also throws up a lot of errors when checking if the tag category & tags already exist. Can anyone suggest where I'm going wrong? I assume I'm using | out-null incorrectly? 



  • 2.  RE: Copy tags from 1 vcenter to another
    Best Answer

    Posted May 20, 2022 10:54 AM

    Did you try adding -ErrorAction SilentlyContinue on the cmdlets that give errors?



  • 3.  RE: Copy tags from 1 vcenter to another

    Posted May 31, 2022 02:14 PM

    Thanks, exactly what i needed 



  • 4.  RE: Copy tags from 1 vcenter to another

    Posted May 27, 2022 06:55 PM

    Run Disconnect-VIServer -Server * -Force before running and after running on each vCenter. I had a similar issue where PowerCLI didn't understand that it should run in another vCenter. Even $defaultviserver indicating vCenter X, get-tag listed was returning tags on vCenter y



  • 5.  RE: Copy tags from 1 vcenter to another

    Posted May 28, 2022 05:45 PM

    Hi,

    not sure but I would try to compare the local categories with the remote categoriere