Fim reference dn not updating
We also still need to run Update-SPProfile Photo Store once the import is complete, to create the three thumbnails that Share Point uses.
We also need to ensure that both the import script and Update-SPProfile Photo Store are run on a machine hosting the User Profile Service service instance.
You can update the initial variables to suit your environment.
You will also need a “dummy” as described over at https://blogs.technet.microsoft.com/adamsorenson/2017/05/24/user-profile-picture-import-with-active-directory-import/.
We do however require Replicating Directory Changes in order to make use of the change log – use the very same account you use to perform ADI and you’re all set. But we need to be aware that this means the solution will only work with a non partitioned UPA.
and of course there is a possibility this GUID may change in the future.
The latter will not raise any exception if it is run elsewhere, it merely does nothing and quits!
I expect you to be familiar with the fundamental concepts of Share Point Multi-Tenancy.
I would also remove the horrible legacy API for alternative credentials.
Otherwise, this script is actually more or less identical to mine, except that I split out the gathering of photos to support Urls as well as Thumbnails, and I used the “private” API for the “partition ID” as I was looking for a way to encourage the powers that be to provide a public API (and needed a solution for Multi Tenant).
If there is enough interest I will publish my Power Shell Module but this script is all you need to get started… For about a year now I’ve been plagued by people asking me how to configure a partitioned User Profile Application (UPA) in Share Point Server 2016, and perform successful profile import using Active Directory Import (ADI).
Every few weeks someone asks for the configuration, and it basically got to the point where it made sense to post this article to which I can refer folks.