Nach einer Migration/URL-Änderung der MySites ist es meinstens notwending auch die URL des Profilbildes zu aktualisieren.
Folgende Möglichkeiten stehen Ihnen dafür zur Verfügung:
- Eine Konsoleaplikation anhand des unteren MSDN Artikels programmieren:
Microsoft MSDN:
Gewusst wie: Ändern der PictureUrl-Eigenschaft aller Benutzerprofile in einer Websitesammlung
- Diesen, anhand vom o.g. Artikel, angepassten PowerShell Skript benutzen:
#Add-PSSnapin Microsoft.SharePoint.Powershell
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint")
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.Office.Server.UserProfiles")
Start-SPAssignment -Global
$s = Get-SPSite "http://mysite_url"
$c = Get-SPServiceContext $s
$profileManager = New-Object Microsoft.Office.Server.UserProfiles.UserProfileManager($c)
$profiles = $profileManager.GetEnumerator();
foreach ($profile in $profiles)
{
$oldurl = $profile[[Microsoft.Office.Server.UserProfiles.PropertyConstants]::PictureUrl].Value;
if($oldurl -ne $null)
{
$newurl = $oldurl.Replace("http://alte_url/", "http://neue_url/");
$profile[[Microsoft.Office.Server.UserProfiles.PropertyConstants]::PictureUrl].Value = $newurl;
$profile.Commit();
Write-Host "Benutzer: " $profile[[Microsoft.Office.Server.UserProfiles.PropertyConstants]::AccountName].Value
Write-Host "Neues Profilbild-Pfad: " $profile[[Microsoft.Office.Server.UserProfiles.PropertyConstants]::PictureUrl].Value
}
Stop-SPAssignment -Global