Harvard University obtained a temporary restraining order from a federal court to block a Trump administration policy that would have barred international students from attending Harvard, effectively a legal restraining order against an action by the President's administration.
Harvard University had to get a restraining order for the President of the United States.

FactVerify
Source: factverify.com
What the Evidence Shows
The claim that Harvard University had to get a restraining order for the President of the United States is mostly true but requires clarification. Multiple sources confirm that Harvard University filed a lawsuit challenging the Trump administration's policy that sought to bar international students from attending Harvard and other institutions. A federal judge granted Harvard a temporary restraining order preventing the administration from enforcing this policy, which effectively blocks an executive action associated with the President.
This restraining order is a legal injunction issued by the court, not a personal restraining order against the President himself. The court order stops the government from implementing certain policies affecting Harvard's international students.
Therefore, while Harvard did obtain a restraining order related to actions taken by the President's administration, it was not a personal restraining order against the President as an individual. The context involves immigration and student visa policies rather than personal conduct or harassment claims. This distinction is important to avoid misunderstanding the nature of the legal action.