PrincipalContext.ConnectedServer Property

 

Gets the name of the server to which the principal context is connected.

Namespace:   System.DirectoryServices.AccountManagement
Assembly:  System.DirectoryServices.AccountManagement (in System.DirectoryServices.AccountManagement.dll)

Public ReadOnly Property ConnectedServer As String

Property Value

Type: System.String

The name of the server to which the principal context is connected or null if the principal context is not connected to a server.

When the context type is Domain, this property returns the name of the domain controller or application directory instance. When the context type is Machine, this property returns the machine name.

.NET Framework
Available since 3.5

System.DirectoryServices.AccountManagement
PrincipalContext Class
System.DirectoryServices.AccountManagement Namespace Overview

Return to top
Show: