Hi Muller,
When using the Set-MgUserPhotoContent
and Get-MgUserPhotoContent
cmdlets, it’s indeed expected that the two files may not be identical due to various factors, including image compression.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Describe the bug
When using Set-MgUserPhotoContent and then Get-MgUserPhotoContent, the returned value is not the same as was set using Set-MgUserPhotoContent. I assume the image is compressed.
To Reproduce
Set-MgUserPhotoContent -infile C:\Temp\photoIn.jpg
Get-MgUserPhotoContent -outfile C:\Temp\photoOut.jpg
Expected behavior
I would expect the two files to be identical
Debug Output
not applicable
Module Version
2.8.0
Environment Data
Name Value
PSVersion 5.1.19041.3570
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.19041.3570
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
Additional context
This is important for tools syncing photos. MIM for example. MIM performs a "confirming import" to check if the correct value was set in the target system.
Hi Muller,
When using the Set-MgUserPhotoContent
and Get-MgUserPhotoContent
cmdlets, it’s indeed expected that the two files may not be identical due to various factors, including image compression.