DanielGates628573

Powershell question

Discussion created by DanielGates628573 on Dec 6, 2017
Latest reply on Dec 6, 2017 by joel_wiesmann_automic
Hello,

I know this is an Automic forum but ...

I have created a workflow with hundreds of jobs.  I now want to add a default postcondition to all the jobs in all the workflows as below:


ljxgkxeiem48.png

Rather than applying this manually I have been trying to amend the xml for the workflow attempting to add this for every 'JOBS'.

I can use powershell to extract the node I have entered manually and can find all the nodes i want to amend ... but I am struggling to insert the additional node into the xml.  I have been using Appendchild but that just seems to move the logic from one parent to the next ... ending up with the last JOBS I come across.

Anyone have any ideas or can this be done any other way?

I can provide the xml examples and powershell used so far if this question is deemed ok here.

Dan


Outcomes