Trump is already in for a bumpy remainder of his term LET ALONE abiding by UNENFORCEABLE COURT RULINGS.
It is Congress's authority to make rules for the government and regulation of the land and naval forces, not the President.
The President commands the forces Congress provides, and under the rules set by Congress.
If Congress dictated that all soldiers would were purple underwear and speak Norwegian, then the President would command an army of purple-underwear wearing Norwegian speakers.