Replace multiple old unions with new ones, keeping transformation, scale and rotation

Hey everyone, I’ve been working on a build recently and have scattered a ton of low poly trees that I’ve made with unions around the map. However, I have made a new tree union which I would like to replace the old ones with. Is there any way I could run a script through the console to simultaneously replace the old trees with the new while keeping the transformations, scaling and rotation of the prior trees, and if so, how could I achieve this?