DirectoryEntry.Invoke Method

Calls a method on the native Active Directory object.

Namespace: System.DirectoryServices
Assembly: System.DirectoryServices (in system.directoryservices.dll)

public Object Invoke (
	string methodName,
	params Object[] args
public Object Invoke (
	String methodName, 
	Object[] args
public function Invoke (
	methodName : String, 
	... args : Object[]
) : Object
Not applicable.



The name of the method to invoke.


An array of type Object objects that contains the arguments of the method to invoke.

Return Value

The return value of the invoked method.

Exception typeCondition


The native method threw a COMException exception.


The native method threw a TargetInvocationException exception. The InnerException property contains a COMException exception that contains information about the actual error that occurred.

If the return value of the native method implements the IADs interface, a corresponding DirectoryEntry is returned. For more information about the IADs interface, see the topic IADs in the MSDN Library at

Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0