Skip to content

Instantly share code, notes, and snippets.

@IAMPetro
Created December 11, 2016 21:56
Show Gist options
  • Save IAMPetro/6027319919a03f2bc0979ad281d1874c to your computer and use it in GitHub Desktop.
Save IAMPetro/6027319919a03f2bc0979ad281d1874c to your computer and use it in GitHub Desktop.
Exchange: Example use of Import-RecipientDataProperty command
# This command will import a single image into the thumbnailPhoto attribute in an Active Directory account
Import-RecipientDataProperty -Identity "" -Picture -FileData ([Byte[]]$(Get-Content -Path "C:\User_Images\" -Encoding Byte -ReadCount 0))
# If you want to remove either the current picture, you can do so by using
Set-Mailbox "" -RemovePicture
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment