SQL Server 2014, Std edition
We have seen and used, over the years, a variety of sprocs and non-MS tools to export the DB schema.
The way we really like to do this is the built in utility, in SSMS, as described here on SO: https://stackoverflow.com/a/12036513/147637
We strongly prefer the MS tool, because it is more complete than hand-rolled tools, and provides super clean, properly organized and structured output.
However, we want to automate this.
How can the MS engine be driven programatically?