Below is smal powershell script to export photos from the Active Directory using AD powershell.
#########################################################
$list=GET-ADuser –filter * -properties thumbnailphoto
Foreach ($User in $list)
{
$Directory=’C:\Photos\’
If ($User.thumbnailphoto)
{
$Filename=$Directory+$User.samaccountname+’.jpg’
[System.Io.File]::WriteAllBytes($Filename, $User.Thumbnailphoto)
}
}
#########################################################