I know script generation can be achieved with the wizard provided by the management studio. In fact, this other question's accepted answer in SO is a great example: How to Generate Scripts For All Triggers in Database Using Microsoft SQL Server Management Studio
My question is wheter I can achieve the same results (as I would get from the wizard) from executing some script or command from a query window, and if positive, how could I do it.
EDIT: In case it matters, I'm working with sql server CE 2012 and its respective ssms