Exception calling "FindAll" with "0" argument(s): "There is no such object on the server. "

Feb 11, 2009 at 5:34 PM
When running the script, it appears the FindAll method of the Get-Users-From-ActiveDirectory function is choking; I get this for every user account:

myUserAD: mzofka result:
Exception calling "FindAll" with "0" argument(s): "There is no such object on the server.
"
At C:\Set-WSS-UserInfo-From-ActiveDirectory.ps1:33 char:36
+     $colResults = $objSearcher.FindAll( <<<< )

Is the script looking for an LDAP object it cannot find?

Feb 11, 2009 at 7:37 PM
I fixed this. It was an insufficient permissions issue of the user running the script.
Feb 16, 2012 at 7:56 AM

Hello! I have a similar error.

Exception calling "FindAll" with "0" argument(s): "There is no such object on the server.
"
At E:\WSS\scripts\Set-WSS-UserInfo-From-ActiveDirectory.ps1:33 char:36
+     $colResults = $objSearcher.FindAll <<<< ()
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : DotNetMethodException

 

Win2003, WSS3.0 SP2

I need your advice! (please)

Feb 23, 2012 at 3:43 PM

Anyone have a fix for this, I have the same problem?

cosjef - Can you elaborate on which permissions you needed to change?

The script used to work for us but we have upgraded our DC recently which may have been a contributing factor.

Any help greatly appreciated.

Cheers,

 

Alex.

Feb 24, 2012 at 11:24 AM

Hello, Alex!

I was able to solve the problem by adding

$objSearcher.SearchRoot = "LDAP://dc=MyDomain, dc=com"


Feb 24, 2012 at 1:19 PM

Thanks so much Nikit.

I just removed the name of the domain controller from the LDAP string and it worked!!

Cheers,

 

Alex.