Update-SPInfoPathAdminFileUrl
Published: July 16, 2012
Applies to: SharePoint Server 2013 Enterprise
Updates InfoPath form templates (.xsn files) and universal data connections (.udcx files), including all .xsn files and .udcx files that were deployed by an administrator.
Update-SPInfoPathAdminFileUrl -Find <Uri> -Replace <Uri> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm [<SwitchParameter>]] [-Scan <SwitchParameter>] [-WhatIf [<SwitchParameter>]]
Parameters
| Parameter | Required | Type | Description | ||
|---|---|---|---|---|---|
| Find | Required | System.Uri | Specifies the URL to find. The type must be a valid URL, in the form http://previous_server_name. | ||
| Replace | Required | System.Uri | Specifies the URL to find. The type must be a valid URL, in the form http://server_name. | ||
| AssignmentCollection | Optional | Microsoft.SharePoint.PowerShell.SPAssignmentCollection | 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.
| ||
| Confirm | Optional | System.Management.Automation.SwitchParameter | Prompts you for confirmation before executing the command. For more information, type the following command: get-help about_commonparameters | ||
| Scan | Optional | System.Management.Automation.SwitchParameter | Run the tool and log the actions that can be taken. No content is changed as a result of the scan. | ||
| WhatIf | Optional | System.Management.Automation.SwitchParameter | 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 |
Detailed Description
The Update-SPInfoPathAdminFileUrl cmdlet updates data connections in administrator-approved InfoPath form templates (.xsn files) and universal data connections (.udcx files). This allows for InfoPath data connections that reference the current farm to be updated when content is migrated to a different farm URL. This cmdlet cannot update any references to URLs that exist in form template business logic (code). Typically, this cmdlet is used with the Import-SPInfoPathAdministratorFiles cmdlet.
Input Types
Return Types
------------------EXAMPLE------------------
Get-SPWebApplication http://contoso2010 | Update-SPInfoPathAdminFileUrl–find "http://contoso2007" –replace "http://contoso2010"
This example updates data connections in administrator-approved InfoPath form templates and universal data connection files. Data connections that reference http://contoso 2007 are updated to reference http://contoso2010.
Change History
| Date | Description |
|---|---|
| July 16, 2012 | Initial publication |

Note: