Update-SPProfilePhotoStore für New MySiteLocation löst eine Ausnahme für gelöschte MySiteLocation aus
-
10-12-2019 - |
Frage
Ich hatte eine fehlerhafte MySite unter http://mysite:8080
, die ich gelöscht habe.Ich habe eine neue Web-App erstellt unter http://portal:8080
erfolgreich, die MySiteHost-Site-Sammlung erfolgreich, mysite in der Benutzerprofildienstanwendung erfolgreich eingerichtet, die drei MySite-Timer-Jobs und auch den Inkrementellen Sync-Timer-Job ausgeführt.
Mit meinem Admin-Konto habe ich es geschafft, eine Mysite zu erstellen und mir meine Eigenschaften anzusehen.Aktualisieren Sie die Eigenschaften in AD, führen Sie den inkrementellen Synchronisierungs-Timer-Job aus und sehen Sie sich die Änderung auf meiner Mysite an.
Ich habe die SharePoint-Benutzereigenschaft „Picture“ auf die AD-Eigenschaft „thumbnailPhoto“ (nur Import) gesetzt und ein Bild in AD hochgeladen (mithilfe von AD Photo Edit).Das (erneute) Ausführen des inkrementellen Timer-Jobs führt weder in UPSA noch auf der Mysite zu einem Ergebnis.Ich versuche, den folgenden Powershell-Befehl mit dem Benutzer SP_Farm auszuführen:
Update-SPProfilePhotoStore -MySiteHostLocation http://portal:8080/
was die folgende (seltsame) Ausnahme ergibt, die auf den alten mysitehost verweist:
Update-SPProfilePhotoStore : The Web application at http://mysite:8080/ could not be found. Verify that you have typed
the URL correctly. If the URL should be serving existing content, the system administrator may need to add a new reques
t URL mapping to the intended application.
At line:1 char:1
+ Update-SPProfilePhotoStore -MySiteHostLocation http://portal:8080/
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidData: (Microsoft.Offic...ofilePhotoStore:SPCmdletUserProfilePhotoStore) [Update-S
PProfilePhotoStore], FileNotFoundException
+ FullyQualifiedErrorId : Microsoft.Office.Server.UserProfiles.PowerShell.SPCmdletUserProfilePhotoStore
Warum passiert das und wie kann ich das wiederbeleben?
Lösung
Ich würde versuchen, das Benutzerprofil über Powershell zu aktualisieren.
$ap = Get-SPServiceApplication –Name "User Profile Service Application"
Set-SPProfileServiceApplication –Identity $ap –MySiteHostLocation "http://portal:8080"
Haben Sie auch versucht, IIS/UPS neu zu starten?