There was a specific court order, from the same Judge of course, to take the DNA. It doesn't appear to be in the form of a warrant though, but I'm not up on the legal differences. At least it doesn't say it's a warrant, as those issued for search and arrest in this case do.
First the Judge and the CPS unlawfully take custody of all the children. Then, because they did so with no regard to which families are affected, they make the claim that the only way to establish parentage is to demand DNA samples from everyone involved, including those who might be incarcerated and subject to criminal prosecution.
The date on the order is April 18, which was AFTER the taking of the children. Had such an order been lawful prior to the taking of the children, then it would have constituted a blanket order to test everybody on the ranch, with few names associated with the order. That would have been too obviously unjustified by the lack of evidence.
The Appeals Court has ordered the return of the children without the benefit of DNA testing. Once the children are returned, the presumptive rationale for obtaining the DNA disappears, bringing into question whether the CPS can continue to hold the DNA information.
The Judge and the CPS basically bet their all on the idea that the DNA testing would prove that crimes have been committed. If it does not, there is going to be hell to pay.