Creating the DirectoryEntry
doesn't do much more than actually creating the object in memory. The DirectoryEntry
object is actually just a managed wrapper around the basic IADsObject
of the unmanaged, COM-based ADSI (Active Directory Service Interfaces)
interface to Active Directory (which you could - if you really wanted to - use directly, too).
Only when you start using its properties, or when you access the underlying .NativeObject
COM object, will it actually connect to Active Directory, log on with your current credentials (or any alternate credentials you supplied), and try and fetch the information for that DirectoryEntry from AD.
Marc