As two actions, you take control of an undead creature that you can touch or see within 10 meters. The creature must make a Will saving throw, which it does with advantage if the creature’s Intelligence is −2 or higher. If the creature is undead, the spell has no effect on it.
On a failure, it you gain control for the duration.
The creature can repeat the saving throw at the end of each of its turns, ending the effect on itself on a success.
Each time the target takes damage, it makes a new saving throw against the spell. If the saving throw succeeds, the spell ends.
Intelligent undead are harder to control in this way. If it fails the saving throw and has an Intelligence of 1 or higher, it can repeat the saving throw at the end of every hour until it succeeds and breaks free.
While you have control, you have a telepathic link with it as long as the two of you are on the same plane of existence. You can use this telepathic link to issue commands to the creature while you are conscious (no action required), which it does its best to obey. You can specify a simple and general course of action, such as “Attack that creature,” “Run over there,” or “Fetch that object.” If the creature completes the order and doesn’t receive further direction from you, it defends and preserves itself to the best of its ability.
You can use two actions to take total and precise control of the target. Until the end of your next turn, the creature takes only the actions you choose, and doesn’t do anything that you don’t allow it to do. During this time, you can also cause the creature to use a reaction, but this requires you to use your own reaction as well.