US President Donald Trump unlawfully ordered National Guard troops to Portland, Oregon, a federal judge ruled Friday in a legal setback to the administration's use of the military in American cities.