Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Today, I have encountered another issue with SharePoint 2010. I have a powershell script that can pull the user profile details from the User Profile store, having used UserProfileManager to get the user profile details its shows the profile count as 75000 however if I enumurate the same object it gives me only 74600 user profiles. I have even tried with foreach and while loop to iterate the enum object howver the end result is same.

How the UserProfileManager Object shows the count as 75000 and the same object gives only 74600 profiles if I enumurate?

Are those 400 profiles are invalid? Even if those are invalid, it should say atleast those are invalid or null, am i right?

Update:

$site = Get-SPSite "http://mysiteurl"
$serviceContext = Get-SPServiceContext $site


$profileManager = New-Object Microsoft.Office.Server.UserProfiles.UserProfileManager($serviceContext)
$userProfiles = $profileManager.GetEnumerator();

$UserCount = 1;

while($userProfiles.MoveNext()) {
$usrprofile = $userProfiles.Current;
$UserCount++ | out-file "E:\Temp\USP.txt" -append
$usrprofile["AccountName"]| out-file "E:\Temp\USP.txt" -append
}

$profileManager.Count gives 75000 however I could see only 74600 entries in the log file "D:\Temp\USP.txt"

What could be the issue? Even, I have verified the profile missed from import and it does not have more than few entries.

Any suggestions?

Update-2: The same code works perfectly in the QA envirnment.

We have configured the UPRE sync in the production, would that be an issue?

share|improve this question
    
by the way user profile service says 75000. –  Karthikeyan Mar 4 '11 at 17:55
    
When you compare the actual differences what is different about the accounts? You mention the UPRE. Are the accounts from a different domain rather than your sync source? Are the accounts marked "missing from import"? –  Matthew McDermott Nov 30 '11 at 15:00
    
I have reprovisioned the Sync DB and it solves the issue. –  Karthikeyan Dec 1 '11 at 3:45

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.