Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

up vote 2 down vote accepted
  1. You can hooked to User Profile via Powershell using following example: http://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.
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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