I have SharePoint 2016 set up with ADI. MySite and everything configured and working properly.

Users were imported without any filters and I got almost 20K users. I have applied filter to get rid of disabled users but not able to bring the users numbers down to active users which will be 10k.

When I execute :

Set-SPProfileServiceApplication $upa -GetNonImportedObjects $true

I can see almost 4k users but when I execute :

Set-SPProfileServiceApplication $upa -PurgeNonImportedObjects $true

It completes successfully but none of users were purged from the first command. I also ran clean up mysite job couple times to check if this will do any better. Another test, I ran the SQL query mentioned below and got almost 10K rows back which seems like kind of close to accurate. Any help?

select * from [upa].[UserProfile_Full] nolock 
where bDeleted=1 
  • Can you confirm that the MySite Cleanup job is running and has recently run? Jun 6, 2017 at 20:43
  • Yes. its running once a day. but I ran it several times earlier , basically after each PS execution . I can also check at history page it shows mysite clean up job succeeded.
    – Umr
    Jun 6, 2017 at 21:15

1 Answer 1


Find out this is a know issue and a fix will be out in August CU for 2016 which came out today and this issue is mentioned in the description. Commands I mentioned above will not clean up user profile in 2016.

Functionality has changed in 2016 : https://blogs.msdn.microsoft.com/spses/2017/05/22/sharepoint-2016-mysitecleanup-job-functionality-changes/

For the CU : https://support.microsoft.com/en-us/help/4011049/august-8-2017-update-for-sharepoint-server-2016-kb4011049


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.