As with so many things here, the remedy for the executive just pulling some nonsense must be sought through the courts. That remedy is being sought, notably by affected businesses. Trump will simply argue that there is a security concern here, or something like that.
The courts, as usual, will first decide which outcome they prefer. They will then try to find some reasoning that will give them that outcome without looking too foolish. The latter step is easy in this case, but it's at least plausible that the courts don't want to crash the global economy. So it could go either way.
Regardless, this is likely to take a while. Courts are slow, especially on contentious issues.
It's also possible that the executive just tries to ignore an unfavorable ruling, as they have already done in other instances; nobody really knows what will happen in that eventuality...