Script Download: SetOSCCsUserPhoto.zip http://gallery.technet.microsoft.com/scriptcenter/Script-to-Set-Default-0a73a86a
This script populates the thumbnailPhoto attribute in Active Directory. It also tries to detect the size of photo and client policy setting before populating the thumbnailPhoto attribute. The recommended photo size in pixels is 96x96 pixels and should be less than 100KB.
You can find more All-In-One Script Framework script samples at http://aka.ms/onescriptingallery