How to export thumbnailphoto from active directory powershell
All the images of the users in the active directory will be exported with the following PowerShell command in this video.
Powershell command
$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)
}
}