Post-October 2011 CU- Running the 'Update-SPProfilePhotoStore' PowerShell command fails with a 'The pipeline has been stopped' error

Post-October 2011 CU- Running the 'Update-SPProfilePhotoStore' PowerShell command fails with a 'The pipeline has been stopped' error

  • Comments 4
  • Likes

After you apply the October2010 Cumulative Update for SharePoint Server 2010 (14.0.6112.5000), the profile picture import can run into some issues.

  1. Profile picture is not imported or updated after running a full synchronization.

The ULS logs will show the following entry:

SavePictureToLibrary: Error processing the photo URL picture_GUID.jpg for user 1: System.UriFormatException: Invalid URI: The hostname could not be parsed. at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind) at System.Uri.CreateUri(Uri baseUri, String relativeUri, Boolean dontEscape) at System.Uri..ctor(Uri baseUri, String relativeUri) at Microsoft.SharePoint.WebPartPages.Utility.CanonicalizeFullOrRelativeUrlCore(String fullOrRelativeUrl, Boolean includeQueryString, Boolean& isFullUrl) at Microsoft.SharePoint.SPWeb.GetList(String strUrl) at Microsoft.Office.Server.UserProfiles.UserProfileGlobal.LoadPictureLibrary(SPWeb rootWeb, ProfileType profileType) at Microsoft.Office.Server.UserProfiles.UserProfileGlobal.GetOrCreatePictureFolder(UserProfileManager userProfileManager) at Microsoft.Office.Server.UserProfiles.UserProfileGlobal.SaveImportedPictureToLibrary(UserProfileManager userProfileManager, Int64 recordId, Byte[] binaryPicture)

      2.    Additionally, the PowerShell command 'Update-SPProfilePhotoStore' to fix the existing pictures and library also fails.

Here's the command that is run to fix the issue with existing pictures:

  Update-SPProfilePhotoStore -CreateThumbnailsForImportedPhotos 1 -MySiteHostLocation http://mysite

However, it fails with an error that looks something like this:

Update-SPProfilePhotoStore : The pipeline has been stopped
At line:1 char:27
+ Update-SPProfilePhotoStore <<<< -CreateThumbnailsForImportedPhotos $true -MySiteHostLocation "http://<MySiteURL> "
+ CategoryInfo : InvalidData: (Microsoft.Offic...ofilePhotoStore:SPCmdletUserProfilePhotoStore) [Update-SPProfilePhotoStore], PipelineStoppedException
+ FullyQualifiedErrorId : Microsoft.Office.Server.UserProfiles.PowerShell.SPCmdletUserProfilePhotoStore

Update-SPProfilePhotoStore : Invalid URI: The hostname could not be parsed.
At line:1 char:27
+ Update-SPProfilePhotoStore <<<< -CreateThumbnailsForImportedPhotos $true -MySiteHostLocation "http://<MySiteURL> "
+ CategoryInfo : ObjectNotFound: (:) [Update-SPProfilePhotoStore], UriFormatException
+ FullyQualifiedErrorId : Microsoft.Office.Server.UserProfiles.PowerShell.SPCmdletUserProfilePhotoStore

image

So far, the issue seems to be limited to environments where the my site is hosted on a root site collection ('/').

In order to fix this, follow the steps listed below:

  • Create new site collection under the root of MySite web and specify the new URL in MySite host settings under the User profile Service Application settings
  • Access the MySite and you should be directed to the new URL for my site.
  • Upload a picture on to your profile page and it should be successful.
  • You should be able to run the 'Update-SPProfilePhotoStore' PowerShell command to fix the existing pictures and libraries. 
Update

The December 2011 CU should do the trick. Here are the links: 

KB.2597058  -  SharePoint Foundation 2010

KB.2597014  -  SharePoint Server 2010

The build number  of the cumulative update package is 14.0.6114.5000

 After you install this hotfix, you must restart the User Profile Synchronization Service for profile synchronization to function correctly.

 Apply the update and the PowerShell script should work again.

Comments
  • Hi, Praveen.

    I've followed your instructions and now I can run Update-SPProfilePhotoStore without errors.

    But how to move my sites of users that have already been created in previous MySite location (in the root of webapp)?

    i.e.

    http://mysites/personal/dom_user1/

    to move to

    http://mysites/sites/my/personal/dom_user1/

    Thank you

  • This is no viable workaround, especially not if you have thousands of profiles.

  • Andrey,

    Glad that it worked. Have an update as well in case it was missed. The December 2011 CU should do the trick.Here are the links:

    support.microsoft.com/.../2597058  -  SharePoint Foundation 2010

    support.microsoft.com/.../2597014  -  SharePoint Server 2010

    The build number  of the cumulative update package is 14.0.6114.5000

    After you install this hotfix, you must restart the User Profile Synchronization Service for profile synchronization to function correctly.

    - Apply the update and the PowerShell script should work again.

    This should get the PowerShell working for the MySites on the root web app.

    Do you still wish to continue with the current configuration and migrate the my sites of users that have already been created in previous MySite location (in the root of web app)?

    If yes, then we can get them migrated so that all the my sites are hosted at http://mysites/sites/my/personal/<user_name>.

    Do let us know.

  • Thomas,

    The December 2011 CU should do the trick. Here are the links:

    support.microsoft.com/.../2597058  -  SharePoint Foundation 2010

    support.microsoft.com/.../2597014  -  SharePoint Server 2010

    The build number  of the cumulative update package is 14.0.6114.5000

    After you install this hotfix, you must restart the User Profile Synchronization Service for profile synchronization to function correctly.

    Apply the update and the PowerShell script should work again.

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment