I discovered that this error was generated because the user account running the command did not have the appropriate permissions in the User Profile Service Application (Central Administration ->Application Management -> Manage Service Applications -> User Profile Service -> Permissions).
I am attempting to import user profile pictures from Active Directory but when running the Update-SPProfilePhotoStore cmdlet it generates an error. Here is the command I am running:
Update-SPProfilePhotoStore -CreateThumbnailsForImportedPhotos 1 -MySiteHostLocation http://mysite.mydomain.local
and this is the error message:
UserProfileApplicationProxy.ApplicationProperties ProfilePropertyCache does not have