ScriptingOptions.Remove Method
SQL Server 2012
Removes a ScriptOption object from the ScriptingOptions object.
Namespace: Microsoft.SqlServer.Management.Smo
Assembly: Microsoft.SqlServer.Smo (in Microsoft.SqlServer.Smo.dll)
Parameters
- scriptOption
- Type: Microsoft.SqlServer.Management.Smo.ScriptOption
A ScriptOption object to be removed from the ScriptingOptions object.
Return Value
Type: Microsoft.SqlServer.Management.Smo.ScriptingOptionsA ScriptingOptions object that does not contain the removed ScriptOption object.
The following code example removes a script option.
Visual Basic
Dim scOps As New ScriptingOptions() scOps.WithDependencies = true scOps.Remove(ScriptOption.WithDependencies)
PowerShell
$scOps = New-Object Microsoft.SqlServer.Management.Smo.ScriptingOptions $scOps.WithDependencies = $TRUE $scOps.Remove([Microsoft.SqlServer.Management.Smo.ScriptOption]::WithDependencies)
