Common Errors

All ADSI-specific errors have a hexadecimal form of 80005xxx. The most common error codes encountered are outlined in the following table.

ADSI hex error codeDescription


An invalid ADSI pathname was passed. This error results from passing a poorly formed ADsPath to GetObject when binding to an object.


The ADSI property cannot be found in the property cache.


The ADSI object exists. If you attempt to create an ADSI object with the same name as an existing ADSI object, this error will occur.


For a complete list of ADSI error codes, see Generic ADSI Error Codes.

COM Errors

Since ADSI is composed of COM objects, it will return standard COM error codes. The following table lists the COM error codes most commonly encountered in ADSI programming.

COM hex error codeDescription


Unspecified error. The cause of the COM object failure is indeterminate by ADSI.


Object not found. This error predominantly occurs due to misspelling the ADsPath string when binding to an object.


See Generic COM Error Codes for a few more examples of COM errors that may occur in ADSI programming.

Win32 Errors

Any error code of the hexadecimal form 8007xxxx is a standard Win32 error code. If you convert the last four digits from hexadecimal to decimal, you can access the error from the Windows 2000 command line:

net helpmsg <number>

In the command line above, "<number>" is the decimal number obtained by converting the last four digits of the error code from hexadecimal. This command line will provide a more useful description of the Win32 error, which can be of great help in debugging your script.



© 2015 Microsoft