Judges have no constitutional authority to micromanage the President. Such a move violates the doctrine of a Separation of Powers, and they also have no enforcement arm to carry out such orders. The enforcement arm of the federal government is the executive branch, and if the President of the United States believes the courts are out of line he has every constitutional authority to tell them to take a hike. That’s what Thomas Jefferson did when the Supreme Court ordered him to give William Marbury his judicial commission, and that is what Andrew Jackson told the courts regarding their ruling in Worcester v. Georgia with the famous quotation, “John Marshall [Chief Justice] has made his decision, now let him enforce it.”
When examining the constitutionality of President Trump’s executive orders, one must only ask if a law is in place that supports it. And in each of the cases which the courts and the media claims Trump is operating outside his constitutional authority, the reality is that President Trump is operating within constitutional limits.
Immigration law, for example, is a federal authority, and any state law contrary to federal immigration law (as per Article VI.), including sanctuary laws, are unconstitutional. So, despite a state governor’s or state legislature’s protests, President Trump may use ICE and Border Patrol to operate within the states to execute immigration law. The President may also use the National Guard as a means of support because of Article I, Section 8.
As per the Alien Enemies Act of 1798 the President has the authority to restrain or remove nationals of a hostile nation, and it does not require the existence of a declared war or invasion despite the presence of such arguments. The Alien Enemies law was passed, signed by President John Adams, and used during the final years of his presidency during a time when there was no war being engaged.