The Trump administration has been ordered to open the delayed 2027 Diversity Visa lottery after a legal challenge.