سؤال

أواجه مشكلة كبيرة في استيراد صور المستخدمين إلى MySite في SharePoint 2010.

لدي برنامج SharePoint 2010 قياسي مثبت.تم استيراد جميع المستخدمين إلى Mysite ويمكننا رؤية جميع الصور المستخدمين في MySite وأيضا في صفحة البحث.لكن أيام قليلة قبل أن نقوم بتثبيت حزمة الخدمة 2. بعد حزمة خدمة جديدة، توقفت خدمة UPS عن العمل، لذلك نحتاج إلى إعادة توحيد UPS.ولكن بعد ذلك لم نتمكن من رؤية أي صور ملف تعريف المستخدمين في الخليط.

تابعت كصفوف في هذا الرابط، (صورة ملف تعريف المستخدم لا تظهر في SP2010 FEB2012 CU ) لكن لسوء الحظ، ما زلت لا أحصل على أي صور.

تحرير: لم نستورد المستخدمين من الإعلان، لكننا أضاف مباشرة إلى الخليط.

هل كانت مفيدة؟

المحلول

If you have recreated the whole service application for User Profiles, did you rebind the User Profile Property PictureURL to the AD property thumbnailPhoto? I have made the mistake to miss this one in the past.

I found a great step by step guide here that outlines these three steps:

  • Create an import PictureURL mapping
  • Perform a full profile synchronization
  • Run the Update-SPProfilePhotoStore PowerShell command

After updated info about not using AD to sync pictures

Have you checked out this post? http://blog.bugrapostaci.com/2012/07/23/after-restoring-sharepoint-profile-databases-some-of-users-pictures-are-not-shown/

Basically a script similar to this (from the link):

Param (
[parameter(Mandatory=$true)][string]$MySiteUrl, 
 [parameter(Mandatory=$false)][Switch]$Update
)

$mySiteHostSite = Get-SPSite $MySiteUrl
$mySiteHostWeb = $mySiteHostSite.OpenWeb()
$context = Get-SPServiceContext $mySiteHostSite
$spPhotosFolder = $mySiteHostWeb.GetFolder("User Photos")

$profileManager = New-Object Microsoft.Office.Server.UserProfiles.UserProfileManager($context)

$AllProfiles = $ProfileManager.GetEnumerator()

foreach($profile in $AllProfiles)
{
$AccountName= $profile[[Microsoft.Office.Server.UserProfiles.PropertyConstants]::AccountName].Value
   if($profile["PictureURL"].Value -eq $null -or $profile["PictureURL"].Value -eq $null )
{
  $checkUrl =$spPhotosFolder.url +"/" + "Profile Pictures" + "/" + $AccountName.Replace("\","_") + "_MThumb.jpg"

  if($mySiteHostWeb.GetFile($checkURL).Exists)
  {
   if($Update)
   { 
    $profile["PictureURL"].Value = $mySiteHostWeb.Url + "/" + $checkurl
    $profile.Commit()
    "Updated!!! " + $AccountName  
    $mySiteHostWeb.Url + "/" + $checkurl
   }
   else
   {
    "Updatable!!! " + $AccountName 
   }
 }
  else
  {
   "Missing !!! " + $AccountName 
  }
}
else
{
  "OK! " + $AccountName + " " + $profile["PictureURL"].Value
}
}

$mySiteHostWeb.Dispose()
$mySiteHostSite.Dispose()

but please see the post for details about what you need to modify for your environment (like "User Photos" folder)

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى sharepoint.stackexchange
scroll top