I am trying to use Powershell to automate the creation of new environments/target machines and so tags mapped to the single tagset (in my scenario).
I have tried using Octopus.Client.dll. I can export the tagset with all the Tags, but I don’t know how to create a new tag and map to it. (I need probably to modify the existing tagset with the new tag in the instruction)…
Thank you for your help.
I am going insane
Deep apologies for the terrible delay here! Somehow this thread slipped through the cracks of our support process :(. Hope you are still sane!
Give this script a try and let me know how it goes: https://github.com/OctopusDeploy/OctopusDeploy-Api/blob/master/Octopus.Client/PowerShell/Tagsets/AddTagToTagset.ps1
thanks for your reply.
I tried the instructions provided, and now I have the new tag in the $tagset.tags list, but if I check on the webpage I cannot find the created tag in the tagset.
PS: I have filled all the fields (apart the description).
Thank you for your time.
Can you believe I forgot to add the line that saves the changes to the TagSet?
I just added it in github :). Go back to that same link and grab the latest version.
Sorry about that!
It’s perfect. Thank you indeed.