Macro to convert assemblies with different configurations into X_T

I need to create X_T files from various assembles with multiple configurations each. Has someone made a macro to do such a task? or can someone point me in the direction to learn how to do it? 

The task scheduler can only configure each assembly. 

 

Thank you for your help.

 

Flavio V.