ScriptingOptions.LoginSid ScriptingOptions.LoginSid ScriptingOptions.LoginSid Property

Definition

Gets or sets the Boolean property value that specifies whether the security identifiers are included for any scripted logins in the generated script.

public:
 property bool LoginSid { bool get(); void set(bool value); };
public bool LoginSid { get; set; }
Public Property LoginSid As Boolean
Property Value

A Boolean value that specifies whether the security identifiers are included for any scripted logins in the generated script.

If True, the security identifiers are included for any scripted logins in the generated script. Otherwise, False (default).

Examples

The following code example specifies that security identifiers for scripted logins will be added to the script.

Visual Basic

Dim scOps As New ScriptingOptions()  
scOps.LoginSid = true  

PowerShell

$scOps = New-Object Microsoft.SqlServer.Management.Smo.ScriptingOptions  
$scOps.LoginSid = $TRUE  

Applies to