. . "It is best to have a list of the defaults to hand and just over-ride the defaults where necessary, but there is a chance that a later revision of SMO could change the defaults so beware! #> $CreationScriptOptions = new-object ($My.ScriptingOptions\") $CreationScriptOptions.ExtendedProperties= $true # yes we want these $CreationScriptOptions.DRIAll= $true # and all the constraints $CreationScriptOp" . .