As a veteran and an officer I believe the posse comitatus act come into play.
I do not believe it could be carried out.
Posse Comitatus aside, Commanders would be pretty busy and frustrated just attempting to track down their own troops’ personal weapons, not to mention surrendering their own. I just don’t see this happening. A federal civil police force dedicated to the task?- yes.