Office 365Windows PowerShell

Upload High Resolution Picture in Exchange Online

Set-UserPhoto Error – Now Solved 🙂



Proxy method PSWS:
Request return error with following error message:
The remote server returned an error: (413) Request Entity Too Large…
+ CategoryInfo          : NotSpecified: (:) [Set-UserPhoto], CmdletProxyException
+ FullyQualifiedErrorId : Microsoft.Exchange.Configuration.CmdletProxyException,Microsoft.Exchange.Management.RecipientTasks.SetUserPhoto

More Information:

Logged an issue in Connect

Refer to the Workaround posted which might have helped some. Unfortunately it didn’t work in WMF 4.0 at all. Recently, I thought of testing the case in Connect to explore some foot prints.


The reason for the error is quite simple – Exchange Online will not allow images greater than 10 KB and 96 x 96


I tried to upload an image using the below PowerShell Code

Set-UserPhoto "Chendrayan" -PictureData ([System.IO.File]::ReadAllBytes("C:\Temp\TestImage.jpg")) -Confirm:$false
Image Information:

Updated TechNet Article

Leave a Reply

Your email address will not be published. Required fields are marked *