Update-SPInfoPathUserFileUrl

更新 InfoPath 表单模板(.xsn 文件)和通用数据连接(.udcx 文件)。

语法

Update-SPInfoPathUserFileUrl
      [-ContentDatabase] <SPContentDatabasePipeBind>
      -Find <Uri>
      -Replace <Uri>
      [-AssignmentCollection <SPAssignmentCollection>]
      [-Confirm]
      [-Scan]
      [-WhatIf]
      [<CommonParameters>]
Update-SPInfoPathUserFileUrl
      [-Site] <SPSitePipeBind>
      -Find <Uri>
      -Replace <Uri>
      [-AssignmentCollection <SPAssignmentCollection>]
      [-Confirm]
      [-Scan]
      [-WhatIf]
      [<CommonParameters>]
Update-SPInfoPathUserFileUrl
      [-WebApplication] <SPWebApplicationPipeBind>
      -Find <Uri>
      -Replace <Uri>
      [-AssignmentCollection <SPAssignmentCollection>]
      [-Confirm]
      [-Scan]
      [-WhatIf]
      [<CommonParameters>]

说明

This cmdlet contains more than one parameter set. You may only use parameters from one parameter set and you may not combine parameters from different parameter sets. For more information about how to use parameter sets, see Cmdlet parameter sets.

cmdlet Update-SPInfoPathAdminFileUrl 更新 InfoPath 表单模板中的数据连接 (.xsn 文件) 和通用数据连接 (.udcx 文件) 。 这样便可以在将内容迁移到其他服务器场 URL 时更新引用当前服务器场的 InfoPath 数据连接。

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

示例

------------------示例------------------

Get-SPWebApplication http://contoso2010 | Update-SPInfoPathUserFileUrl -Find "http://contoso2007" -Replace "http://contoso2010"

此示例为 Web 应用程序 http://contoso2010 下的所有内容更新 InfoPath 表单模板和通用数据连接文件中的数据连接。

引用 http://contoso2007 的数据连接将更新为引用 http://contoso2010。

参数

-Confirm

执行命令前,看到确认提示。 有关详细信息,请键入以下命令:get-help about_commonparameters

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

-ContentDatabase

指定将开始更新的父内容数据库。

键入的值必须是以下值:格式为 12345678-90ab-cdef-1234-567890bcdefgh 的有效 GUID;内容数据库的有效名称(如 SPContent DB1);或有效 SPContentDatabase 对象的实例。

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

-Find

指定要查找的 URL。

键入的值必须为有效的 URL,格式为 http://previous_server_name。

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

-Replace

指定要查找的 URL。

键入的值必须为有效的 URL,格式为 http://server_name。

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

-Scan

运行此工具,并记录可执行的操作。 扫描不会导致任何内容发生更改。

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

-Site

指定将开始更新的父网站集。

键入的值必须为 12345678-90ab-cdef-1234-567890bcdefgh 形式的有效 GUID;http://sites/example 形式的有效 URL;或有效 SPSite 对象的实例。

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

-WebApplication

指定将开始更新的父 SharePoint Web 应用程序。

键入的值必须为 http://server_name 形式的有效 URL;12345678-90ab-cdef-1234-567890bcdefgh 形式的有效 GUID;SharePoint Web 应用程序的有效名称(如 MyOfficeApp1);或有效 SPWebApplication 对象的实例。

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

-WhatIf

Displays a message that describes the effect of the command instead of executing the command. For more information, type the following command: get-help about_commonparameters

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

-工作分配

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