"Post Installation Wizard" and many other settings per terminal


I would like to write a script to install and configure Virtualmin automatically on each server I install.

I find setting up the server toke too much time for the scriptable process, is there any documentation I can refer to that could help me, or even a script I can learn from it.

Thank you

any suggestion on this?