Update-SPProfilePhotoStore

更新設定檔相片存放區與 SharePoint Server 相容。

Syntax

Update-SPProfilePhotoStore
      -MySiteHostLocation <SPSitePipeBind>
      [-AssignmentCollection <SPAssignmentCollection>]
      [-CreateThumbnailsForImportedPhotos <Boolean>]
      [-NewBaseUri <Uri>]
      [-NoDelete <Boolean>]
      [-OldBaseUri <Uri>]
      [<CommonParameters>]

Description

從 Office SharePoint Server 升級至 SharePoint Server 之後,請執行 Update-SPProfilePhotoStore Cmdlet 以確保 SharePoint 設定檔相片存放區與 SharePoint Server 相容。 只有在 Update-SPProfilePhotoStore 從 Office SharePoint Server 升級完成之後,才應該使用 Cmdlet。 使用 Cmdlet Update-SPProfilePhotoStore 時,會從原始相片建立具有可預測大小和名稱的三個縮圖版本、將新相片放入「我的網站主機」的使用者相片庫,並更新設定檔資料庫中的屬性值。

During the operation, the original image is left as-is. If the operation fails for certain users for any reason, it continues on to the next user.

During the migration of profile photos from one server URL to another, one can use the OldBaseUri and NewBaseUri parameters. You just need to specify the starting portion of the URL that has changed from old to new and an attempt to rebase the profile picture URLs will occur.

例如,OldBaseUri: https://server1/my/ProfilePhotos ;NewBaseUri: https://server1/my/NewLocation/ProfilePhotos

如需適用於 SharePoint 產品的 Windows PowerShell 權限及最新資訊,請參閱線上文件 SharePoint Server Cmdlet

範例

------------------EXAMPLE-------------------

Update-SPProfilePhotoStore -MySiteHostLocation https://mysites

此範例會將相片上傳至所指定之「我的網站」主機位置。

參數

-AssignmentCollection

Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects are automatically disposed of if an assignment collection or the Global parameter is not used.

When the Global parameter is used, all objects are contained in the global store. If objects are not immediately used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type:SPAssignmentCollection
Position:Named
Default value:None
Accept pipeline input:True
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition

-CreateThumbnailsForImportedPhotos

為所有匯入的使用者設定檔圖片建立縮圖。

Type:Boolean
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition

-MySiteHostLocation

指定接收上傳相片之「我的網站」主機位置的 URL。

Type:SPSitePipeBind
Position:Named
Default value:None
Accept pipeline input:True
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition

-NewBaseUri

為設定檔圖片指定新的 URL。 例如,https://server2/。

Type:Uri
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition

-NoDelete

當值設定為 true 時,為其建立縮圖之後,將會保留匯入的使用者設定檔圖片檔案。

注意

只有當 CreateThumbnailsForImportedPhotos 設定為 時,此功能才適用 $true

Type:Boolean
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition

-OldBaseUri

為設定檔圖片指定舊的 URL。 例如,https://server1/。

Type:Uri
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition