AvailabilityReplica.Role Property
SQL Server 2012
Gets the replica role object associated with this instance.
Namespace: Microsoft.SqlServer.Management.Smo
Assembly: Microsoft.SqlServer.Smo (in Microsoft.SqlServer.Smo.dll)