So, historically I've used the following script to set the thumbnail photo for a AD user object:
Set-ADUser jdoe -Replace @{thumbnailPhoto=([byte[]](Get-Content "C:\photos\jdoe_photo.jpg" -Encoding byte))}
I would run this command directly from one of our domain controllers.
Now however the command doesn't work. Any Set-ADUser commands I issue fail with the error "Set-ADUser : Unable to contact the server. This may be because this server does not exist, it is currently down, or it does not have the Active Directory Web Services running."
I've tried a number of things (such as specifying different DCs, specifying credentials, etc) and can't figure out why it isn't working. The services all appear to be running on all our DCs.
One thing that has changed is we're taking our first steps in migration to 365. I have Azure AD Sync set up and have some pilot users syncing over and migrated.
Does maybe having Azure AD Sync running affect anything like this? The DC I generally run the command on is not the server running the sync (though I did try it there to see if it was any different). I can run Get-ADUser on this user object without issue, but I can't Set-ADUser and running these commands doesn't appear to be putting anything in the event logs. The user I'm trying to modify is not a synced user--the AD object exists only on-prem.