Update-SPProfilePhotoStore

汇报与 SharePoint Server 兼容的个人资料照片存储。

语法

Default (默认值)

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

说明

从 Office SharePoint Server 升级到 SharePoint Server 后,运行 Update-SPProfilePhotoStore cmdlet 以确保 SharePoint 个人资料照片存储与 SharePoint Server 兼容。 Update-SPProfilePhotoStore只有在从 Office SharePoint Server 升级完成后,才应使用该 cmdlet。 Update-SPProfilePhotoStore使用 cmdlet 时,将从原始照片创建三个具有可预测大小和名称的缩略图版本,新照片将放入“我的网站主机的用户照片”库中,并更新配置文件数据库中的属性值。

在操作期间,原始图像会保持原样。 如果特定用户因任何原因而导致操作失败,则会直接移到下一用户。

将配置文件图片从一台服务器 URL 迁移到另一台服务器 URL 期间,用户可以使用 OldBaseUri 和 NewBaseUri 参数。 您只需指定已从旧 URL 更改为新 URL 的 URL 的起始部分,系统就会尝试为配置文件图片 URL 重新设定基址。

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

有关适用于 SharePoint 产品的 Windows PowerShell 的权限和最新信息,请参阅 SharePoint Server cmdlet

示例

Update-SPProfilePhotoStore -MySiteHostLocation https://mysites

此示例将照片上载到指定的“我的网站”宿主位置。

参数

-AssignmentCollection

适用:SharePoint Server 2010、SharePoint Server 2013、SharePoint Server 2016 SharePoint Server 2019

管理对象以便正确进行处理。 使用 SPWeb 或 SPSite 等对象可能会耗用大量内存,而且在 Windows PowerShell 脚本中使用这些对象需要正确管理内存。 通过使用 SPAssignment 对象,可以将对象分配给变量,然后在不需要这些对象时对它们进行处理,以释放内存。 在使用 SPWeb、SPSite 或 SPSiteAdministration 对象时,如果不使用分配集合或 Global 参数,则会自动处理这些对象。

使用全局参数时,所有对象均包含在全局存储中。 如果未立即使用对象,或未通过使用 Stop-SPAssignment 命令来处理对象,则可能会发生内存不足的情况。

参数属性

类型:SPAssignmentCollection
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:True
来自管道的值(按属性名称):False
来自剩余参数的值:False

-CreateThumbnailsForImportedPhotos

适用:SharePoint Server 2010、SharePoint Server 2013、SharePoint Server 2016 SharePoint Server 2019

为所有已导入的用户配置文件图片创建缩略图。

参数属性

类型:Boolean
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-MySiteHostLocation

适用:SharePoint Server 2010、SharePoint Server 2013、SharePoint Server 2016 SharePoint Server 2019

指定“我的网站”宿主位置的 URL,照片将上载到该位置。

参数属性

类型:SPSitePipeBind
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:True
来自管道的值:True
来自管道的值(按属性名称):False
来自剩余参数的值:False

-NewBaseUri

适用:SharePoint Server 2010、SharePoint Server 2013、SharePoint Server 2016 SharePoint Server 2019

指定配置文件图片的新 URL。 例如,https://server2/.

参数属性

类型:Uri
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-NoDelete

适用:SharePoint Server 2010、SharePoint Server 2013、SharePoint Server 2016 SharePoint Server 2019

当该值设置为 true 时,导入的用户配置文件图片文件将在创建缩略图后保留这些文件。

注意

仅当 CreateThumbnailsForImportedPhotos 设置为 时,此功能才起作用 $true

参数属性

类型:Boolean
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-OldBaseUri

适用:SharePoint Server 2010、SharePoint Server 2013、SharePoint Server 2016 SharePoint Server 2019

指定配置文件图片的旧 URL。 例如,https://server1/.

参数属性

类型:Uri
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

CommonParameters

此 cmdlet 支持通用参数:-Debug、-ErrorAction、-ErrorVariable、-InformationAction、-InformationVariable、-OutBuffer、-OutVariable、-PipelineVariable、-ProgressAction、-Verbose、-WarningAction 和 -WarningVariable。 有关详细信息,请参阅 about_CommonParameters