I have a similar problem: to flash multiple teensy when i made changes to the code.
Afaik using TyQT's commandline interface i could upload to specific ports.
As Visual Micro is actually quite neatly tied into Visualstudio, you can compile using themsbuild "YourSolution.sln"...