I was able to do this in SharePoint 2013, however the code below does not work in SharePoint 2016 (on-Prem) and no error is thrown. Anyone else encounter this?

the PowerShell code:

# SharePoint 2010/2013/2016
Add-PSSnapin Microsoft.SharePoint.Powershell -ErrorAction SilentlyContinue

$mySitesUrl = Read-Host `n`n"Enter the Url of the MySites Web Application[http://mysites.portal.contoso.com]"`n

# Update MySite Thumbnail Photo Store
Update-SPProfilePhotoStore -CreateThumbnailsForImportedPhotos 1 -MySiteHostLocation $mySitesUrl

Write-Host "MySite Thumbnail Update Completed!" -ForegroundColor Green
  • 1
    Works fine here. Did you give the user running it full control in Administrators as well as Permissions on the UPSA?
    – user6024
    Commented Mar 4, 2016 at 17:48
  • yes, I have all the correct permissions. I can manually upload a picture to a MySite just fine. Using Softerra's LDAP Browser I can see the Photo however I noticed that when the LDAP browser displays the page, the photo pops up real big before the LDAP program changes the height/width for display. So another question. If the photo being uploaded is large, will that affect SharePoint's ability to import it ?
    – Bismarck
    Commented Mar 4, 2016 at 19:05
  • No, it won't. How are you otherwise getting the pictures into the UPSA? MIM is required here as AD Import does not bring in thumbnailPhoto.
    – user6024
    Commented Mar 4, 2016 at 19:06
  • The Photos are already in AD. Are you saying that I need Microsoft Identity Manager in order for SharePoint 2016's (on-Prem) UserProfile Sync to Import the "ThumbnailPhoto" mapping?
    – Bismarck
    Commented Mar 7, 2016 at 12:37
  • That is correct. Or custom code.
    – user6024
    Commented Mar 7, 2016 at 15:44

1 Answer 1


Microsoft Identity Manager 2016 is needed to import the profile photos.

For the script to run correctly you must run it under the SP Farm account. This is very import for it to work.

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.