We are using User Profile Synchronization to get basic profile information for staff. The User Profile is editable by the user. I believe there cannot be a two way sync between AD & SP in this case. Photo information was initially imported from a network drive file storage before User Profiles were changed to enable editing.

We have a number of new staff with missing PHOTO information (all other profile information intact). We need to update these. Would someone guide me as to what steps I need to take to accomplish this through PS.

We do not want to overwrite any of the existing photos - just add photos from a source using script to check for missing photos and update if the photo exists.

1 Answer 1


You can have 2 way sync with the User Profile Synchronization Service, you cannot with ADI. You can update user profiles through the UI, in which case the photos will be stored in the My Site Host. Or you can use PowerShell to update the User Profiles for your target users, but you must be a UPS Administrator.

$Context  = Get-SPServiceContext -site $MySiteURL
$UserProfileManager = New-Object Microsoft.Office.Server.UserProfiles.UserProfileManager($Context)

#Get the User Profile
$up = $UserProfileManager.GetUserProfile($UserLogin)
$up["PictureURL"].Value = $UserPhotoUrl

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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