![]() ![]() I am going to post a sample for a single searchbase so it is easier to look at.There are definitely redundancies in repeating parts the script for each OU. The script is NOT efficient but it works, I am SURE there are ways to make it a little smaller and more friendly to pop in some variables, I may update it later, but I wanted something that worked.We kept the Picture Exchange Sync State attribute set to 1 just because, not sure if this is necessary.The SharePoint user profile should have a link defined in the "picture" attribute, I believe this is created by default regardless of whether the user had a picture synced previously or not.Uploads the 3 SPO thumbnails to the tenant User Profiles Library.Runs the Set-UserPhoto cmd to for each user to set the photo in EXO (Delve, etc.).Using an Image-Resize script, it resizes and properly names the 3 SPO thumbnails.It then exports the photo to a local drive.The script targets the 3 main OU's we are concerned with and creates an array of users that have the thumbnailPhoto attribute set in AD.Rather than rely on 365 sync process, this script uses on prem AD as the source and manually updates the picture in both EXO and SPO.I create this script to synchronize the pictures from our Active Directory on prem to SPO and EXO (this covers most of the services we use atm that pull the profile picture). ![]() An admin could use the Set-UserPhoto cmd to update the photo but it would take anywhere from 24-72 hours to update in SharePoint, if it even did it at all. One issue is that the photo sync only works on the initial sync of the photo, if we update an AD photo the changed photo never reflected in SharePoint (unsure if this changed yet). We are all aware that the photo sync process is messy and rarely works well. They may have removed them on their own, but they still existed in our on-prem AD and we wanted to make sure they were in sync. I attached the script to this post, the code in the post is only for reference.įor some unknown reason, user profile photos were missing from Delve and SharePoint Online. I wanted to share a script I came up with to help keep our active directory profile photos in sync with Office 365 and SharePoint Online, but first a little background on WHY I did this and how the script works along with a few caveats. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |