Not sure it would be legal, because they would have to nationalize the troops, they would then be part of the standing army, and posse comitatus would apply.
Sec. 1385. Use of Army and Air Force as posse comitatus
Whoever, except in cases and under circumstances expressly authorized by the Constitution or Act of Congress, willfully uses any part of the Army or the Air Force as a posse comitatus or otherwise to execute the laws shall be fined under this title or imprisoned not more than two years, or both.
Obviously, exceptions are included in the law. 1) Constitution: repel invasion might apply, but I don’t think that would apply in various states and different locations for a round-up effort.
However, (2) Congress can pass a law to approve such an action. Personally, I doubt they ever would.
From Wikipedia, on Posse Comitatus:
“The Act only specifically applies to the United States Army and, as amended in 1956, the United States Air Force
... the Act does not explicitly mention the United States Navy and the United States Marine Corps
... The Act does not apply to the Army National Guard and the Air National Guard under state authority from acting in a law enforcement capacity within its home state or in an adjacent state if invited by that state’s governor.
The United States Coast Guard, which operates under the Department of Homeland Security, is not covered by the Posse Comitatus Act either”