Search code examples
active-directorygoogle-apps

thumbnailPhoto from Active Directory to Google Apps


I've set everyones photo within Active Directory to the attribute thumbnailPhoto. How do I sync this to their Google Profile? I'm currently using GADS but can't find any instructions to do this.


Solution

  • This script is working for me.

    Get-ADUser -Filter * -Properties thumbnailphoto, EmailAddress | where {$_.thumbnailphoto} | foreach {$_.thumbnailphoto | Set-Content -Path "C:\Downloads\ADPicture\Pictures\$($_.EmailAddress).jpg" -Encoding Byte}
    
    
    C:\gam\gam.exe all users update photo C:\Downloads\ADPicture\Pictures\#user#.jpg