Depending on the jurisdiction of the lawsuit, the judge (or panel of judges) will probably have the right to file an injunction which can prevent even the president from doing something. The Republican party got into the habit of using state Attorney Generals to sue the Obama administration and the resulting injunctions drastically slowed or killed some aspects of his policies. You can bet many of the Democratic party AGs are just itching to do the same thing, especially those with political ambition in heavily blue states. I don't know if the President has ever been held in contempt but it's a reliable process for preventing policy implementations.