How can you display a list of user profiles that are missing from the AD import?
I know you can go to Manage User Profiles and search for individual users that are missing, but it doesn't seem to allow you to list all missing users. Ideally I would like to get this list with Powershell so further processing can be undertaken.
The below command will display users who are present but have never been imported from AD. Nearly there, but not quite what I am after. I need a lit of users who were initially brought in as part of the sync, but are now missing from the import. I know Sharepoint does flag these, because as per above I can see them under Manage User Profiles.
Set-SPProfileServiceApplication -Identity $upa -GetNonImportedObjects $false