aramis erak
Legend
Depends a bit on what the controlling undead rules are for the system. As for intelligent undead, does the spell create an undead soul or pull the person's original soul back to their now undead form?
That varies by game. And in D&D, by edition. Note that in 5E AL play, you cannot resurrect someone who's been turned to a vampire until they've been slain. So, at least for vampires, the soul is trapped there.
I believe, but am not redoing the checks, most of the free willed undead would be like vampires - until you free them, they're stuck. And if you destroy them in certain ways, they may be gone forever.
(This was relevant in the one AD&D Dragonlance adventure I ran... the Gnome wanted to use Soul Jars on incorporeal undead, then use them to power magical machines.)