Export thumbnailphoto from AD to jpg for all users

For exporting users thumbnail photo from AD to jpg for all users you can use script below:

Get-ADUser -Filter * -Properties thumbnailphoto | 
where {$_.thumbnailphoto} | foreach {$_.thumbnailphoto | 
Set-Content -Path "C:$($_.UserPrincipalName).jpg" -Encoding Byte}

~Pouyan

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.