daknetworks.com

You are here: Blog Add Photo into Outlook / Exchange 2013 for Everyone

Add Photo into Outlook / Exchange 2013 for Everyone

Sometimes when I get an email from someone in OUTLOOK, their photo shows. How do they do that?

Setting your picture can happen in a few ways.

OUTLOOK

  • To set your picture:
  • -open OUTLOOK.
  • -click FILE (at the top-right).
  • -click CHANGE (under the picture).

WEB SITE

This is also possible on the web site at:

  • -https://domain.tld/owa
  • -click your name (at the top-right).
  • -click CHANGE (under the picture).

ADMIN

This is also possible by having the administrator do it for a single user, OU or entire domain.

For a single user and you know the file location:

  • Set-UserPhoto "username" -PictureData ([Byte[]] $(Get-Content -Path "C:\path-to-file\username.jpg" -Encoding Byte -ReadCount 0)) -Confirm:$false

For everyone:

  • -save photos in common location.
  • -name the photos the same as the username.
  • -get all the users in EXCHANGE:
    get-user -resultsize unlimited |select samaccountname |export-csv c:\pah-to-file\users.csv
  • -add a column called "picture"
  • -run the command:
    Import-csv "c:\pah-to-file\users.csv" | foreach {Set-UserPhoto -Identity $_.samaccountname -PictureData ([System.IO.File]::ReadAllBytes(c:\path-to-pics\$_.samaccountname.jpg)) -Confirm:$false}

For an OU

  • get-aduser -filter * -searchbase "ou=<location>,ou=<users>,dc=<domain-name>,dc=com" -properties HomeDirectory |foreach ( $_.samaccountname ) {Set-UserPhoto -Identity $_.samaccountname -PictureData ([System.IO.File]::ReadAllBytes($_.HomeDirectory+"\"+$_.samaccountname+".jpg")) -Confirm:$false}

Done!

Contact Dak Networks

We are not taking on new clients at this time.