1

For this example, I have a list of first names

Fred
Mark    
Tony
Alisa
Todd
Emily

I would like to compare them to profiles in the user profile service

Fred
Greg
Tony
Alisa
John

And get output of all the names that are in the User Profile Service but not in the list.

Greg
John

I would like to delete those profiles that do not exist in the list. How can I do this via PowerShell?

2
  1. You can hooked to User Profile via Powershell using following example: https://stackoverflow.com/questions/3157038/accessing-sharepoint-userprofile-properties-with-powershell-script
  2. Save your list in a csv file
  3. Perform a for each loop from the csv file and try to find a match in user profile properties.
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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