ScriptingOptions.EnforceScriptingOptions Property
SQL Server 2012
Gets or sets the Boolean property value that specifies whether the application of all scripting options is enforced for text-based objects, such as SchemaQualify.
Namespace: Microsoft.SqlServer.Management.Smo
Assembly: Microsoft.SqlServer.Smo (in Microsoft.SqlServer.Smo.dll)
Property Value
Type: System.BooleanA Boolean value that specifies whether the application of all scripting options is enforced for text-based objects.If True, the application of all scripting options is enforced for text-based objects.If False (default), object text is scripted without any modification.
The following code example specifies that the application of scripting options will be enforced for text-based objects.
Visual Basic
Dim scOps As New ScriptingOptions() scOps.EnforceScriptingOptions = true
PowerShell
$scOps = New-Object Microsoft.SqlServer.Management.Smo.ScriptingOptions $scOps.EnforceScriptingOptions = $TRUE
