Using Dominate to get the Truth from a Captive
Dominate person offers two modes of operation for a dominated creature:
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."
You can use your action 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.
Can either of these be used to force a captive to answer questions to the best of their ability?