Sharepoint - User Information List not sync'd with User Profile database

There are two jobs, User Profile to SharePoint Quick Sync and User Profile to SharePoint Full Sync, that synchronize the User Profile database information with the UIL. Sometimes this stops working (properly) and in that case you need to run:

stsadm -o sync -listolddatabases 0
stsadm -o sync -deleteolddatabases 0

The first command will list Content Databases that haven't had the UPA -> UIL sync occur in 0 or more days. The second command will delete the records corresponding to those databases (it doesn't delete databases/end user data).


Microsoft has added an article on how to Reset profile synchronization using powershell Maintain user profile synchronization settings in SharePoint Server 2013

To get the User Profile Service application object, type the following command:

$upa = Get-spserviceapplication <identity>

To view the users and groups to delete, type the following command:

Set-SPProfileServiceApplication $upa -GetNonImportedObjects $true

To delete the obsolete users and groups, type the following command:

This action cannot be undone.

Set-SPProfileServiceApplication $upa -PurgeNonImportedObjects $true