Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

Set-ADUser Replace Thumbnailphoto failure: Cannot bind parameter 'Replace' to the target. Exception setting "Replace" : "Object Reference"

$
0
0

Hi community

Yesterday, I wrote a quick bit of PS script to set the thumbnailphotos for users in my test domain with a view to updating their SharePoint User profile photos.  I get a weird exception with the photothumbnail image (as bytes).  I can happily set string values to other properties such as Company and also I can even upload the exact same image to the AD property via a free image uploader:http://www.cjwdev.co.uk/Software/ADPhotoEdit/Info.html . However, I think it would be good to get the ps to work as this will be a lot faster if used in conjunction with say a spreadsheet. I think there is a binary verses decimal format thing going on here but I am just guessing as when I look at the $PictureAsBytes in the debugger it shows decimals rather than hex.

 

Regards

Daniel




Viewing all articles
Browse latest Browse all 21975

Trending Articles