ServerConnection.FixedServerRoles Property

Gets the fixed server role associated with the referenced connection.

Namespace:  Microsoft.SqlServer.Management.Common
Assembly:  Microsoft.SqlServer.ConnectionInfo (in Microsoft.SqlServer.ConnectionInfo.dll)

public FixedServerRoles FixedServerRoles { get; }

Property Value

Type: Microsoft.SqlServer.Management.Common.FixedServerRoles
A FixedServerRoles object value that specifies the fixed server role associated with the referenced connection.

C#

ServerConnection conn = new ServerConnection();
Console.WriteLine(conn.FixedServerRoles.ToString());

PowerShell

$conn = new-object Microsoft.SqlServer.Management.Common.ServerConnection
Write-Host $conn.FixedServerRoles

Community Additions

Show: