共用方式為


Server.BrowserServiceAccount 屬性

Gets the service account that the Browser service runs under on the instance of SQL Server.

命名空間:  Microsoft.SqlServer.Management.Smo
組件:  Microsoft.SqlServer.Smo (在 Microsoft.SqlServer.Smo.dll 中)

語法

'宣告
<SfcPropertyAttribute(SfcPropertyFlags.None Or SfcPropertyFlags.Expensive Or SfcPropertyFlags.Standalone)> _
Public ReadOnly Property BrowserServiceAccount As String 
    Get
'用途
Dim instance As Server 
Dim value As String 

value = instance.BrowserServiceAccount
[SfcPropertyAttribute(SfcPropertyFlags.None|SfcPropertyFlags.Expensive|SfcPropertyFlags.Standalone)]
public string BrowserServiceAccount { get; }
[SfcPropertyAttribute(SfcPropertyFlags::None|SfcPropertyFlags::Expensive|SfcPropertyFlags::Standalone)]
public:
property String^ BrowserServiceAccount {
    String^ get ();
}
[<SfcPropertyAttribute(SfcPropertyFlags.None|SfcPropertyFlags.Expensive|SfcPropertyFlags.Standalone)>]
member BrowserServiceAccount : string
function get BrowserServiceAccount () : String

屬性值

型別:System.String
A String object that specifies the SQL Server Browser service account on the instance of SQL Server.

備註

SQL Server Browser provides SQL Server connection information to client computers and is shared across multiple SQL Server and Integration Services instances.

範例

C#

Server srv = new Server("(local)");
Console.WriteLine("The browser service account is " + srv.BrowserServiceAccount);

PowerShell

$srv = new-Object Microsoft.SqlServer.Management.Smo.Server("(local)")
Write-Host "The browser service account is" $srv.BrowserServiceAccount

請參閱

參考

Server 類別

Microsoft.SqlServer.Management.Smo 命名空間

其他資源

使用集合

管理伺服器