As two actions, one undead creature that you can touch or see within 10 meters must make a Will saving throw.
On a failed save, you take control of it for the duration. 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 the target has an Intelligence of −2 or higher, it has advantage on the saving throw. 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.