If you put a command into Reported speech there are some steps which are the same like in statements: (changing of the person, backshift of tenses, changing of expressions of time).
The form is mostly: form of to tell + to + infinitive.
|Affirmative commands||Negative commands|
|Father: "Do your homework."||Teacher. "Don't talk to your neighbour."|
|Father told me to do my homework.||The teacher told me not to talk to my neighbour.|