Wednesday, June 5, 2013

Adding Employee Photos to Outlook Contacts, Part 2

Steps to add Employee Contact Photos to Outlook

In the part 1 of this blog post, I reviewed a little bit of history about photos for Outlook. In this posting, I will cover one specific strategy for getting contact photos into the GAL.
The high-level steps are as follows:
  1. Establish a source folders where all of the original photos are stored.  This should be your master copy of employee pictures in their original high resolution format.
  2. Establish a temporary target folder where we can store converted thumbnail photos.  
  3. Run the PhotoToGAL PowerShell script available from the itrezzo website.
  4. Set up a tool that will allow you to validate whether or not the files were properly imported into AD.

Establishing a Contact Photo Library

A folder of employee photos may be in a wide variety of encoding formats and resolutions.  It is important to place the source photo files in a secure location and make sure they are backed up. It wouldn’t be unreasonable to place them in a document management system or other version control system.
Each file should named according to the Windows Alias, which is usually the same as the logon identity.  To get a list of the aliases, use the Exchange Management Shell and issue the following command:
[PS] C:\Windows\system32>get-mailbox


Name                      Alias                ServerName       ProhibitSendQuota
----                      -----                ----------       -----------------
Andrew D. Yavtushenko     ADY                  vmp-ex4          unlimited
SRV-Trend                 SRV-TREND            vmp-ex4          unlimited
Marty A. Baab             MAB                  vmp-ex4          unlimited
Monty G. Langster         MGL                  vmp-ex4          758.8 MB (795,648,000 by
Ivan N. Smith             ins                  vmp-ex4          433.6 MB (454,656,000 by


Ensure that all of the filenames match their respective alias and that they have one of the following extensions:
  • JPG 
  • JPEG 
  • BMP 
  • TIF 
  • TIFF 
  • GIF 
  • PNG
Setting up a Thumbnail Folder
First, let's setup the simplest possible file structure to get AD photo upload working.  As a suggestion, create a “Photo” folder on the “D” drive of a Server that has the Exchange Powershell installed and working.  The following file structure would minimize editing of the Powershell script as well as make this document easier to follow since all of the file path examples will match your environment.
D:\Photos
D:\Photos\BIN
D:\Photos\Originals
D:\Photos\ThumbNails


Once you have created these folders, proceed to the next step. Of course you easily change the location of any folder path by editing the Powershell script .

Setting up the PhotoToGAL Powershell script

The procedure in this blog posting requires a powershell script which you can find on the itrezzo Support site. Open a browser on this URL:
Unzip the contents of PhotoToGAL.ZIP  to the BIN Folder
Copy a few test photos to the D:\Photos\Originals folder.  These can be very large photos. The powershell script will convert them for you to the thumbnailPhoto format and they will be 10kb or less once converted.
Launch the Exchange Management Shell.
Enter the fully qualified path of the script:
[PS] C:\> D:\Photos\Bin\PhotoToGAL.PS1
At this point, it is important to take note of the results. The script will report problems in the PowerShell. If you edit the script, most variable settings will be shown at the top of the file. Make sure they match your environment.


Validating Photos in Active Directory

It is possible to use Outlook to display the results of your test. However, there are issues with the Offline Address Book not syncing the photos right away. Furthermore, Outlook may not show the photos right away either because working offline might mean you are viewing an older replica of the GAL.
If you dont already have some type of tool to enhance Active Directory Users and Computers, try the ADUC application to view photos from ADUC:
Download  http://support1.itrezzo.com/updates/server/Utility/3rd/adext.zip and follow the instructions in the readme.txt. This utility will add two tabs to the AD Users and Computers MMC Snap-in. One of the tabs will allow you to see the thumbnailPhoto that you have just imported.
Once you have pictures in Active Directory, it is possible to configure an itrezzo Mandatory Contact List to push out the new thumbnailPhotos to Outlook Contacts and thus every smartphone in your organization.
Another choice is to let the Outlook Social Connector run on each Outlook Desktop and update the thumbnails. While the updates may seem erratic and require that Outlook be running when they are being performed, this may nonetheless happen automatically for some users.