Proprietà Server.ServiceAccount
Gets the service account under which the instance of SQL Server is running.
Spazio dei nomi Microsoft.SqlServer.Management.Smo
Assembly: Microsoft.SqlServer.Smo (in Microsoft.SqlServer.Smo.dll)
Sintassi
'Dichiarazione
<SfcPropertyAttribute(SfcPropertyFlags.Standalone)> _
Public ReadOnly Property ServiceAccount As String
Get
'Utilizzo
Dim instance As Server
Dim value As String
value = instance.ServiceAccount
[SfcPropertyAttribute(SfcPropertyFlags.Standalone)]
public string ServiceAccount { get; }
[SfcPropertyAttribute(SfcPropertyFlags::Standalone)]
public:
property String^ ServiceAccount {
String^ get ();
}
[<SfcPropertyAttribute(SfcPropertyFlags.Standalone)>]
member ServiceAccount : string
function get ServiceAccount () : String
Valore proprietà
Tipo: System.String
A String value that specifies service account for the instance of SQL Server.
Esempi
C#
Server srv = new Server("(local)");
Console.WriteLine("The SQL Server service account is:" + srv.ServiceAccount);
PowerShell
$srv = new-Object Microsoft.SqlServer.Management.Smo.Server("(local)")
Write-Host "The SQL Server service account is:" $srv.ServiceAccount
Vedere anche
Riferimento
Spazio dei nomi Microsoft.SqlServer.Management.Smo
Planning a SQL Server Installation