A court has ruled against the Trump administration on providing personal hygiene items to detailed migrants.