ADDS Dump thumbnailPhoto to JPG file

Use this command line in Powershell to save a users thumbnailPhoto to a file.
First start a Powershell session with Active Directory Modules loaded, then:

get-aduser “sAMAccountname” -server “FQDN Domain Controller”-properties thumbnailPhoto | select -expandproperty thumbnailphoto | set-content -path “JPG Location” -encoding byte

Example:
get-aduser peter_miller -server dc1.contoso.com -properties thumbnailPhoto | select -expandproperty thumbnailphoto | set-content -path c:\temp\peter_miller.jpg -encoding byte

The option -server is optional. Use it to prove that all servers return the same picture (check sync problems)

This entry was posted in Information Technology, Tips and tagged , . Bookmark the permalink.

Comments are closed.