The troops will not participate in law enforcement activities, two officials said, unless the president chooses to invoke the Insurrection Act.