SOLVED

set-userphoto

Brass Contributor

Hi Experts

 

I want to upload profile picture of one user, i am getting error. i dont remember the error now

i have used the below syntax i am getting error.
Is there restriction on photo dimensions or size?


Set-UserPhoto "username" -PictureData ([System.IO.File]::ReadAllBytes("C:\Users\Administrator\Desktop\photo.jpg"))

 

One of my other user wants to upload new picture replacing the existing one.
will the below syntax work.


Set-UserPhoto "username" -PictureData ([System.IO.File]::ReadAllBytes("C:\Users\Administrator\Desktop\photo.jpg"))

 

1 Reply
best response confirmed by Rising Flight (Brass Contributor)
Solution

Yes, there are limits, most prominent one being the 10KB size when running it against other users. Follow the method detailed here as a workaround: https://support.microsoft.com/ml-in/help/3062745/user-photos-aren-t-synced-from-the-on-premises-envi...

1 best response

Accepted Solutions
best response confirmed by Rising Flight (Brass Contributor)
Solution

Yes, there are limits, most prominent one being the 10KB size when running it against other users. Follow the method detailed here as a workaround: https://support.microsoft.com/ml-in/help/3062745/user-photos-aren-t-synced-from-the-on-premises-envi...

View solution in original post