"Flipping" user accounts...

wondering if anyone has any advice idea of how to go about this.

Situation, I have a datasource that sync's several thousand user accounts against an Active Directory. Because of a network issue (the closest domain controller is actually in another location and was being testy) we lost the syncing when the schedule went off. Long story short every domain account got disabled by UserSync service and I had to manually flip them all back on but also changed the user accounts from type "Windows - synchronized" to "simply "Windows".

Now fast forward a number of weeks. The DC issues have been fixed and now I want to flip them all back to "windows  - synchronized". Unfortunately in that time apparently some account (no idea who's) have been purged/removed from the domain and it's causing the mass changing because I get an error when it fails to find a SID. Unfortunately the admin console doesn't tell me what account it failed on, nor does it continue with the remaining accounts. It simply fails.

Has anyone any suggestions on how to get around this issue and get the rest of my good accounts re-syncing? Is there a way to test accounts against the domain and if they can't get a SID then they get disabled (kinda like UserSync does but only when the accounts are set that way)?

Thanks in advance.