Using Active Directory Thumbnails in SharePoint 2013

Add-PSSnapin Microsoft.SharePoint.PowerShell
$mySitesUrl = “https://mysite.sharepoint.com”
$mySites = Get-SPSite –Identity $mySitesUrl
Update-SPProfilePhotoStore –MySiteHostLocation $mySites –CreateThumbnailsForImportedPhotos $true

One issue I ran into recently had to do with changing the MySite URL. I installed to port 8443 initially to get around the issue of homing multiple SSL sites to the same IP address. After updating the Default Zone URL, all the profile pictures broke (The URL was still referring to the old port number). After spending several hours researching how to resolve this issue, I came up empty handed. I tried running the command above and it didn’t do anything to update the URLs. Stopping short of running a query to manually update the Profile database, I re-examined the PowerShell cmdlet above. Since I didn’t want to “create new thumbnails”, I tried removing that switch and sure enough, all the URLs in the profile database updated properly with the new URL.

One thing to keep in mind with this command is that it should be run as the Farm administrator since the User Profile Service Application runs with those credentials.

You should also setup a task in to run periodically. Since the default time for a User Profile Incremental Sync is 1:00 AM, I set up my scheduled task to fire at 2:00 AM. Your scheduled task can look like this:

Run As: DOMAIN\FarmAccount
Command: c:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
Arguments: -NonInteractive -NoProfile -File

Excellent Reference for AD Photos and their tie-in with Outlook, Lync and SharePoint:

Advertisements

One thought on “Using Active Directory Thumbnails in SharePoint 2013

  1. Pingback: sharepoint2013admin

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s