O'Reilly logo

Microsoft® Lync® Server 2013 Unleashed Second Edition by Randy Wintle, Alex Lewis, David Ross, Tom Pacyk

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Uploading Photos Using the Exchange Management Shell

To upload a photo using the Exchange Management Shell, place a copy of the photo in a local subdirectory that is accessible to the Management Shell. The filename of the photo can then be referenced in a variable within the shell and used to apply the photo to the user account. For example, the following series of Exchange Management Shell commands would be used to upload a photo with a filename of dross.jpg to the corresponding user account:

$photostring = "c:\temp\dross.jpg"$pic=([Byte[]] $(Get-Content -Path $photostring -Encoding Byte -ReadCount 0))Set-UserPhoto -Identity dross -PictureData $pic -confirm:$falseSet-UserPhoto -Identity dross -save -confirm:$false ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required