Help sought with the check-sharepoint-orphaned-users script

Sep 11, 2014 at 6:15 PM
I downloaded the check orphaned users powershell script. I modified the startprocess function to use my farm's URLs and to specify our domain.
I type
PS C:\Users\sa_spfarm\desktop> ./check-sporphans.ps1 > d:\temp\orphans.txt

As output, I see

Total of Site Collections: 20
Collection N° 1 on 20
SiteCollectionURL: http://myfarm Users Items: 2851 User Login: mydomain\user FindAll : Exception calling "FindAll" with "0" argument(s): "A referral was returned from the server.
At C:\Users\sa_spfarm\desktop\check-sporphans.ps1:20 char:36
  • $colResults = $objSearcher.FindAll <<<< ()
    • CategoryInfo : NotSpecified: (:) [], MethodInvocationException
    • FullyQualifiedErrorId : DotNetMethodException

  1. What is the Collection N line with the degree symbol?
  2. What does "User Items" mean?
  3. What is needed to resolve the "FindAll" exceptions?
Thank you.
Sep 11, 2014 at 7:48 PM
In looking at the code, it seems to me that the warning I am seeing might be that the script has a user from sharepoint's userlist, goes to active directory to find that user, and this warning is being produced when the user is not in active directory.
It sure produces a lot of needed output since the warning itself tells me nothing about the user that is failing.
so far nothing has been written out into the file at the end of the redirection. I suppose after another 6 or 8 hours something will eventually be written out.
Sep 12, 2014 at 11:58 AM
So, it has been more than 12 hours, the script is still running, there is still nothing that was written out to the file.
I am beginning to suspect that each time the above error is encountered, there may not be a return code, thus making certain that no output is being produced.

I also am beginning to suspect not many answers appear on this discussion area.