I'm experimenting with dbatools, and comparing the output of export-dbascript
to that of the SSMS "Generate Scripts" wizard. export-dbascript
's behavior is controlled in part by an smo.ScriptingOptions object, and the ScriptingOptions defaults don't appear to match the Generate Scripts defaults. For example, I think the ScriptingOptions.withdependencies property corresponds to "Generate Script for Dependent Object" in the wizard, but the former is set to False by default and the latter to True.
What set of ScriptingOptions defaults differ from those of the wizard, and how would they have to be changed to mimic it?