The ruling, which the Trump administration immediately moved to appeal, was a rebuke of Mr. Trump’s expansive view of executive power.

The ruling, which the Trump administration immediately moved to appeal, was a rebuke of Mr. Trump’s expansive view of executive power.