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: empdross.jpg"
$pic=([Byte[]] $(Get-Content -Path $photostring -Encoding Byte -ReadCount 0))
Set-UserPhoto -Identity dross -PictureData $pic -confirm:$false
Set-UserPhoto -Identity dross -save -confirm:$false

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset