The oath is to support and defend the Constitution of the United States against all enemies, foreign and domestic... and to obey the orders of the President of the United States. (Interestingly, the officers’ oath does not include the line about obeying the orders of the President.)
If an illegal order had been issued and he refused to follow it, we would be having a different discussion. Badmouthing the commander in chief, especially after having been warned about it before, is prejudicial to good order and discipline and is a violation of the UCMJ.
“prejudicial to good order and discipline”
***Except when needed for political gain****
repeal of don’t ask don’t tell comes to mind...