Get-SPDataConnectionFile
Example
[image]

Returns a data connection file or a collection of data connection files.

Get-SPDataConnectionFile [-Identity <SPDataConnectionFilePipeBind>] [-AssignmentCollection <SPAssignmentCollection>]

Parameters

Parameter Required Type Description

Identity

Optional

Microsoft.Office.InfoPath.Server.Cmdlet.SPDataConnectionFilePipeBind

Specifies the data file connection to get.

The type must be a valid GUID, in form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a data connection file (for examle, DataConnectionFileName1.udcx); or an instance of a valid SPDataConnectionFile object.

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.

Note:
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.

Detailed Description

The Get-SPDataConnectionFile cmdlet gets a specified data connection file or a collection of data connection files. If the Identity parameter is not specified, the cmdlet returns the collection of data connection files for the farm.

Input Types

Return Types

Errors

Error | Description

Exceptions

Exceptions | Description

Example

---------------EXAMPLE 1--------------
Copy Code
Get-SPDataConnectionFile

This example lists the Identity, DisplayName, and WebAccessible properties of each udcx file.

---------------EXAMPLE 2--------------
Copy Code
"Sample.udcx" | Get-SPDataConnectionFile

This example lists the Identity, DisplayName, and WebAccessible properties of the specified file, named "Sample.udcx".

---------------EXAMPLE 3--------------
Copy Code
Get-SPDataConnectionFile | where {$_.Category -eq "Category1"}

This example lists the Identity, DisplayName, and WebAccessible properties of all udcx files with the specified Category.
Click here to submit feedback on this topic.


Get-SPDataConnectionFileDependent
Example
[image]

Returns deployed forms on the server dependent on a Universal Data Connection.

Get-SPDataConnectionFileDependent -Identity <SPDataConnectionFilePipeBind> [-AssignmentCollection <SPAssignmentCollection>]

Parameters

Parameter Required Type Description

Identity

Required

Microsoft.Office.InfoPath.Server.Cmdlet.SPDataConnectionFilePipeBind

Specifies the data connection file to get.

The type must be a valid GUID, in form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a data connection file (for examle, DataConnectionFileName1.udcx); or an instance of a valid SPDataConnectionFile object.

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.

Note:
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.

Detailed Description

Use Get-SPDataConnectionFileDependent to return all administrator deployed forms that depend on a specified Universal Data Connection (UDC) file located in the central data connection store.

Input Types

Return Types

Errors

Error | Description

Exceptions

Exceptions | Description

Example

--------------EXAMPLE-----------------
Copy Code
Get-SPDataConnectionFileDependant -Identity "FileName.udcx
Copy Code
"FileName.udcx" | Get-SPDataConnectionFileDependant

This example displays a list of deployed forms with a specified name.


Install-SPDataConnectionFile
Example
[image]

Installs the provided data connection file.

Install-SPDataConnectionFile -Path <String> [-AssignmentCollection <SPAssignmentCollection>] [-Category <String>] [-Confirm [<SwitchParameter>]] [-Overwrite <SwitchParameter>] [-WebAccessible <SwitchParameter>] [-WhatIf [<SwitchParameter>]]

Parameters

Parameter Required Type Description

Path

Required

System.String

Specifies the full path to the name of the file in the data connection store.

The type must be the name of a valid data connection file; for example, C:\foldername\myconnection.udcx.

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.

Note:
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.

Category

Optional

System.String

Sets an arbitrary category on the file which can be used to group the files. The category name can have a maximum of 255 characters.

The type must be a valid string value; for example, Category1.

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

Overwrite

Optional

System.Management.Automation.SwitchParameter

Overwrites the existing data connection file. The default value is False.

WebAccessible

Optional

System.Management.Automation.SwitchParameter

Specifies that the Universal Data Connection file can be accessed by using the Web service. If False, only the forms server can retrieve the Universal Data Connection files internally. The default value is False.

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 Install-SPDataConnectionFile cmdlet installs the provided data connection file. If the specified data connection file exists, the user is prompted to replace the existing file.

This cmdlet does not create a new file, it creates a new data connection file object.

Input Types

Return Types

Errors

Error | Description

Exceptions

Exceptions | Description

Example

---------------EXAMPLE--------------
Copy Code
Install-SPDataConnectionFile -Path .\folder\sample.udcx -Category "Install" -WebAccessible $true
Copy Code
".\folder\sample.udcx" | Install-SPDataConnectionFile -Category "Install" -Category "Category1"  -Overwrite $true

This example uploads a data connection file to a specified category.

This cmdlet is equivalent to the Upload Data Connection File user interface setting that is located on the Manage Data Connection Files page of the SharePoint Central Administration Web site.


Set-SPDataConnectionFile
Example
[image]

Sets properties of a data connection file.

Set-SPDataConnectionFile -Identity <SPDataConnectionFilePipeBind> [-AssignmentCollection <SPAssignmentCollection>] [-Category <String>] [-Confirm [<SwitchParameter>]] [-Description <String>] [-DisplayName <String>] [-WebAccessible <String>] [-WhatIf [<SwitchParameter>]]

Parameters

Parameter Required Type Description

Identity

Required

Microsoft.Office.InfoPath.Server.Cmdlet.SPDataConnectionFilePipeBind

Specifies the data connection file to update.

The type must be a valid GUID, in form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a data connection file (for examle, DataConnectionFileName1.udcx); or an instance of a valid SPDataConnectionFile object.

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.

Note:
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.

Category

Optional

System.String

Sets an arbitrary category on the file which can be used to group the files. The category name can have a maximum of 255 characters.

The type must be a valid string value; for example, Category1.

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

Description

Optional

System.String

Sets the description for the data connection file. The name can be a maximum of 4096 alphanumeric characters.

The type must be a valid string; for example, Description of my universal data connection file.

DisplayName

Optional

System.String

Specifies the display name that describes the data connection file. The name can have a maximum of 255 characters.

The type must be a valid string; for example, InfoPathUDC1.

WebAccessible

Optional

System.String

Specifies that the Universal Data Connection file can be accessed by using the Web service. If false, then only the forms server can retrieve the Universal Data Connection files internally. The default value is false.

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 Set-SPDataConnectionFile cmdlet sets the properties of the data connection file specified in the Identity parameter.

Input Types

Return Types

Errors

Error | Description

Exceptions

Exceptions | Description

Example

--------------EXAMPLE-----------------
Copy Code
Set-SPDataConnectionFile -Identity "sample.udcx" -Category "Temp"

This example updates the Category of the specified udcx file.

--------------EXAMPLE 2-----------------
Copy Code
Set-SPDataConnectionFile -Identity "sample.udcx" -DisplayName "NewDisplayName"

This example updates the DisplayName of the specified udcx file.

--------------EXAMPLE 3-----------------
Copy Code
Sample.udcx" | Set-SPDataConnectionFile -Category "Temp"

This example updates the Category of the specified udcx file.

--------------EXAMPLE 4-----------------
Copy Code
Get-SPDataConnectionFile | where {$_.Category -eq "Category1"}  | Set-SPDataConnectionFile -Category "Category2"

This example updates the Category field for the collection of udcx files that are returned from a query used by the Get-SPDataConnectionFile cmdlet.


Uninstall-SPDataConnectionFile
Example
[image]

Removes a data connection file.

Uninstall-SPDataConnectionFile -Identity <SPDataConnectionFilePipeBind> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm [<SwitchParameter>]] [-WhatIf [<SwitchParameter>]]

Parameters

Parameter Required Type Description

Identity

Required

Microsoft.Office.InfoPath.Server.Cmdlet.SPDataConnectionFilePipeBind

Specifies the data connection file to remove.

The type must be a valid GUID, in form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a data connection file (for examle, DataConnectionFileName1.udcx); or an instance of a valid SPDataConnectionFile object.

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.

Note:
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.

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

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 Uninstall-SPDataConnectionFile cmdlet removes the data connection file specified in the Identity parameter.

Input Types

Return Types

Errors

Error | Description

Exceptions

Exceptions | Description

Example

--------------EXAMPLE-----------------
Copy Code
Uninstall-SPDataConnectionFile -Identity "Sample.udcx
Copy Code
"Sample1.udcx", "Sample2.udcx", "Sample3.udcx" | Uninstall-SPDataConnectionFile

This example uninstalls a specified data connection file using two different ways.


Add-SPInfoPathUserAgent
Example
[image]

Adds a user agent to a farm.

Add-SPInfoPathUserAgent -Name <String> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm [<SwitchParameter>]] [-WhatIf [<SwitchParameter>]]

Parameters

Parameter Required Type Description

Name

Required

System.String

Specifies the name of the user agent to receive InfoPath files. These user agents represent search bots that are commonly used in an enterprise environment. If a different search technology is being used and InfoPath files are not being indexed, you can add additional search bots for that technology to the collection.

The type must be a valid file name; for example UserAgentName1.

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.

Note:
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.

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

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 Add-SPInfoPathUserAgent cmdlet creates a user agent to receive the XML file that contains the data of the form for indexing. The user agent receives the InfoPath files from InfoPath Forms Services instead of Web pages in response to an HTTP request.

Input Types

Return Types

Errors

Error | Description

Exceptions

Exceptions | Description

Example

------------EXAMPLE-----------------
Copy Code
Add-SPInfoPathUserAgent -Name "NewAgent"

This example creates a new agent named, "NewAgent".


Disable-SPInfoPathFormTemplate
Example
[image]

Deactivates a form template from the specified site collection.

Disable-SPInfoPathFormTemplate -Identity <SPFormTemplatePipeBind> -Site <SPSitePipeBind> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm [<SwitchParameter>]] [-WhatIf [<SwitchParameter>]]

Parameters

Parameter Required Type Description

Identity

Required

Microsoft.Office.InfoPath.Server.Cmdlet.SPFormTemplatePipeBind

Specifies the InfoPath form template to disable.

The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a form template (for example, InfoPathFormTemplate1); a valid name of a form template files (for example, FormTemplateFile1.xsn); or an instance of a valid SPFormTemplate object.

Site

Required

Microsoft.SharePoint.PowerShell.SPSitePipeBind

Specifies the site collection that contains the form to deactivate.

The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid URL, in the form http://server_name; or an instance of a valid SPSite object.

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.

Note:
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.

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

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 Disable-SPInfoPathFormTemplate cmdlet deactivates the form template specified in the Identity parameter.

Input Types

Return Types

Errors

Error | Description

Exceptions

Exceptions | Description

Example

---------------EXAMPLE--------------
Copy Code
Disable-SPInfoPathFormTemplate -Identity "FormTemplate.xsn" -Site http://testSite
Copy Code
"FormTemplatexsn" | Disable-SPInfoPathFormTemplate -Site "http://testSite"

This example deactivates a form from a site collection named "TestSite".


Enable-SPInfoPathFormTemplate
Example
[image]

Activates a form template in the specified site collection.

Enable-SPInfoPathFormTemplate -Identity <SPFormTemplatePipeBind> -Site <SPSitePipeBind> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm [<SwitchParameter>]] [-WhatIf [<SwitchParameter>]]

Parameters

Parameter Required Type Description

Identity

Required

Microsoft.Office.InfoPath.Server.Cmdlet.SPFormTemplatePipeBind

Specifies the InfoPath form template to activate. The form template must be an administrator approved, browser-enabled form template that is available on the server farm.

The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a form template (for example, InfoPathFormTemplate1); a valid name of a form template files (for example, FormTemplateFile1.xsn); or an instance of a valid SPFormTemplate object.

Site

Required

Microsoft.SharePoint.PowerShell.SPSitePipeBind

Specifies the site collection that contains the form to activate.

The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid URL, in the form http://server_name; or an instance of a valid SPSite object.

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.

Note:
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.

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

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 Enable-SPInfoPathFormTemplate cmdlet activates an InfoPath form template to the SharePoint site collection specified in the Site parameter. This cmdlet returns a new form template.

Input Types

Return Types

Errors

Error | Description

Exceptions

Exceptions | Description

Example

--------------EXAMPLE-----------------
Copy Code
Enable-SPInfoPathFormTemplate -Identity "FormTemplate.xsn" -Site "http://TestSite"
Copy Code
"FormTemplatexsn" | Enable-SPInfoPathFormTemplate -Site "http://TestSite"

This example activates a form template to a site collection named, "TestSite".


Export-SPInfoPathAdministrationFiles
Example
[image]

Saves form templates on the SharePoint Central Administration Web site and UDCX files to a CAB file.

Export-SPInfoPathAdministrationFiles -Path <String> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm [<SwitchParameter>]] [-Identity <SPFormsServicePipeBind>] [-WhatIf [<SwitchParameter>]]

Parameters

Parameter Required Type Description

Path

Required

System.String

Specifies the location and name of the output CAB file.

The type must be a valid file path, in the form \\ipadmin\folder\backups1\ipfsfiles.cab.

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.

Note:
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.

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

Identity

Optional

Microsoft.Office.InfoPath.Server.Cmdlet.SPFormsServicePipeBind

Specifies the site collection that contains the form template and Central Admin UDCX files to export.

The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid URL, in the form http://server_name; or an instance of a valid SPSite object.

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 Export-SPInfoPathAdministrationFiles cmdlet saves all form templates (XSN files) and universal data connections (UDCX files) located on the SharePoint Central Administration Web site. The backup package includes all InfoPath Workflow forms that were deployed by an administrator and not included with Microsoft SharePoint Server 2010, and browser forms that were deployed by an administrator. The backup package is output to the specified CAB file.

Input Types

Return Types

Errors

Error | Description

Exceptions

Exceptions | Description

Example

---------------EXAMPLE--------------
Copy Code
Export-SPInfoPathAdministrationFiles -path d:\file.cab

This example saves a form template.


Get-SPInfoPathFormsService
Example
[image]

Returns the forms service settings in the farm.

Get-SPInfoPathFormsService [-AssignmentCollection <SPAssignmentCollection>] [-Identity <SPFormsServicePipeBind>]

Parameters

Parameter Required Type Description

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.

Note:
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.

Identity

Optional

Microsoft.Office.InfoPath.Server.Cmdlet.SPFormsServicePipeBind

Specifies the forms service settings to get.

The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a forms service (for example, FormsService1); or an instance of a valid SPFormsService object.

Detailed Description

The Get-SPInfoPathFormsService cmdlet reads the settings for the forms service specified in the Identity parameter. If the Identity parameter is not specified, this cmdlet returns the collection of forms services on the farm.

Input Types

Return Types

Errors

Error | Description

Exceptions

Exceptions | Description

Example

-----------EXAMPLE----------------
Copy Code
Get-SPInfoPathFormsService

This example displays the form service settings for the entire farm.


Get-SPInfoPathFormTemplate
Example
[image]

Returns an InfoPath form template.

Get-SPInfoPathFormTemplate [-Identity <SPFormTemplatePipeBind>] [-AssignmentCollection <SPAssignmentCollection>]

Parameters

Parameter Required Type Description

Identity

Optional

Microsoft.Office.InfoPath.Server.Cmdlet.SPFormTemplatePipeBind

Specifies the InfoPath form template to get.

The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a form template (for example, InfoPathFormTemplate1); a valid name of a form template files (for example, FormTemplateFile1.xsn); or an instance of a valid SPFormTemplate object.

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.

Note:
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.

Detailed Description

The Get-SPInfoPathFormTemplate cmdlet reads a specific form template or the collection of templates. If the Identity parameter is not specified, the cmdlet returns the collection of form templates for the farm.

Input Types

Return Types

Errors

Error | Description

Exceptions

Exceptions | Description

Example

---------------EXAMPLE 1--------------
Copy Code
Get-SPInfoPathFormTemplate

This example lists the Identity, DisplayName, and FormTemplateStatus for each admininstrator deployed form template.

---------------EXAMPLE 2--------------
Copy Code
"SomeFormTemplate.xsn" | Get-SPInfoPathFormTemplate | format-list

This example lists all the properties of the specified form template.


Get-SPInfoPathUserAgent
Example
[image]

Returns a user agent or all the currently defined user agents for the farm.

Get-SPInfoPathUserAgent [-Identity <SPUserAgentPipeBind>] [-AssignmentCollection <SPAssignmentCollection>]

Parameters

Parameter Required Type Description

Identity

Optional

Microsoft.Office.InfoPath.Server.Cmdlet.SPUserAgentPipeBind

Specifies the user agent to get.

The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a user agent (for example, UserAgent1; or an instance of a valid SPUserAgent object.

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.

Note:
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.

Detailed Description

The Get-SPInfoPathUserAgent cmdlet reads the user agent specified in Identity. If the Identity parameter is not specified, this cmdlet returns the collection of user agents for the farm.

Input Types

Return Types

Errors

Error | Description

Exceptions

Exceptions | Description

Example

--------------EXAMPLE-----------------
Copy Code
Get-SPInfoPathUserAgent

This example displays a list of user agents in the entire farm.


Get-SPInfoPathWebServiceProxy
Example
[image]

Returns the Web proxy settings for the Web application.

Get-SPInfoPathWebServiceProxy -Identity <SPWebServiceProxyPipeBind> [-AssignmentCollection <SPAssignmentCollection>]

Parameters

Parameter Required Type Description

Identity

Required

Microsoft.Office.InfoPath.Server.Cmdlet.SPWebServiceProxyPipeBind

Specifies the SharePoint Web application to get.

The type must be a valid URL, in the form http://server_name, or a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh.

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.

Note:
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.

Detailed Description

The Get-SPInfoPathWebServiceProxy cmdlet reads the Web proxy settings for the SharePoint Web application specified in Identity.

Input Types

Return Types

Errors

Error | Description

Exceptions

Exceptions | Description

Example

--------------EXAMPLE-----------------
Copy Code
Get-SPInfoPathWebServiceProxy -Identity "http://server_name"

This example displays the Web service proxy settings for a specified Web application.


Import-SPInfoPathAdministrationFiles
Example
[image]

Imports form templates and UDCX files located on the SharePoint Central Administration Web site.

Import-SPInfoPathAdministrationFiles -Path <String> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm [<SwitchParameter>]] [-Identity <SPFormsServicePipeBind>] [-WhatIf [<SwitchParameter>]]

Parameters

Parameter Required Type Description

Path

Required

System.String

Specifies the location of the CAB file to import.

The type must be a valid file path, in the form \\ipadmin\folder\backups1\ipfsfiles.cab.

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.

Note:
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.

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

Identity

Optional

Microsoft.Office.InfoPath.Server.Cmdlet.SPFormsServicePipeBind

Specifies the destination Forms service for the import.

The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a forms service (for example, FormsService1); or an instance of a valid SPFormsService object.

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 Import-SPInfoPathAdministrationFiles cmdlet imports form templates (XSN files) and universal data connections (UDCX files) located on the SharePoint Central Administration Web site into the specified Forms service. This cmdlet imports from a backup package that includes all InfoPath Workflow forms that were deployed by an administrator and not included with Windows SharePoint Server, and browser forms that were deployed by an administrator.

Input Types

Return Types

Errors

Error | Description

Exceptions

Exceptions | Description

Example

--------------EXAMPLE-----------------
Copy Code
Import-SPInfoPathAdministrationFiles -path "backupfiles.cab"

This example imports a form template.


Install-SPInfoPathFormTemplate
Example
[image]

Installs an InfoPath form template on a farm.

Install-SPInfoPathFormTemplate -Path <String> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm [<SwitchParameter>]] [-EnableGradualUpgrade <SwitchParameter>] [-NoWait <SwitchParameter>] [-WhatIf [<SwitchParameter>]]

Parameters

Parameter Required Type Description

Path

Required

System.String

Specifies the path and name of the form template to install.

The type must be a valid path and file name of a form template, in the form:

  • C:\folder_name\formtemplate_name

  • \\server_name\folder_name\formtemplate_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.

Note:
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.

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

EnableGradualUpgrade

Optional

System.Management.Automation.SwitchParameter

Specifies that the new form can be gradually upgraded.

  • If specified and the form template file exists, the form template is gradually upgraded and is then used for new sessions only.

  • If not specified and the form template does not exist, the form is overwritten during an upgrade and is then used for exisiting and new sessions.

  • If specified and the form template file does not exist, ignore the switch.

  • If not specified and the file exists, prompt the user to upgrade and use the gradual upgrade if the upgrade is allowed.

NoWait

Optional

System.Management.Automation.SwitchParameter

Specifies that the form template is installed in the background and not show the progress of the install.

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 Install-SPInfoPathFormTemplate cmdlet installs an InfoPath form template on a farm.

Input Types

Return Types

Errors

Error | Description

Exceptions

Exceptions | Description

Example

---------------EXAMPLE--------------
Copy Code
Install-SPInfoPathFormTemplate -Path c:\Form.xsn
Copy Code
"FormTemplateFirst.xsn", "FormTemplateSecond.xsn", "FormTemplateThird.xsn" | Install-SPInfoPathFormTemplate

This example installs multiple form templates on a farm.


Remove-SPInfoPathUserAgent
Example
[image]

Removes a user agent.

Remove-SPInfoPathUserAgent -Identity <SPUserAgentPipeBind> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm [<SwitchParameter>]] [-WhatIf [<SwitchParameter>]]

Parameters

Parameter Required Type Description

Identity

Required

Microsoft.Office.InfoPath.Server.Cmdlet.SPUserAgentPipeBind

Specifies the name of the user agent to delete.

The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a user agent (for example, UserAgent1; or an instance of a valid SPUserAgent object.

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.

Note:
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.

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

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 Remove-SPIPUserAgent cmdlet removes a specified user agent from the user agent collection on a farm.

Input Types

Return Types

Errors

Error | Description

Exceptions

Exceptions | Description

Example

--------------EXAMPLE-----------------
Copy Code
Remove-SPInfoPathUserAgent -Identity "UserAgentName"

This example removes a user agent.


Set-SPInfoPathFormsService
Example
[image]

Sets paramaters for the InfoPath Forms Services.

Set-SPInfoPathFormsService [-ActiveSessionTimeout <Nullable>] [-AllowEmbeddedSqlForDataConnections <String>] [-AllowUdcAuthenticationForDataConnections <String>] [-AllowUserFormBrowserEnabling <String>] [-AllowUserFormBrowserRendering <String>] [-AllowUserFormCrossDomainDataConnections <String>] [-AllowViewState <String>] [-AssignmentCollection <SPAssignmentCollection>] [-Confirm [<SwitchParameter>]] [-DefaultDataConnectionTimeout <Nullable>] [-Identity <SPFormsServicePipeBind>] [-MaxDataConnectionResponseSize <Nullable>] [-MaxDataConnectionRoundTrip <Nullable>] [-MaxDataConnectionTimeout <Nullable>] [-MaxFormLoadTime <Nullable>] [-MaxPostbacksPerSession <Nullable>] [-MaxSizeOfFormSessionState <Nullable>] [-MaxUserActionsPerPostback <Nullable>] [-RequireSslForDataConnections <String>] [-ViewStateThreshold <Nullable>] [-WhatIf [<SwitchParameter>]]

Parameters

Parameter Required Type Description

ActiveSessionTimeout

Optional

System.Nullable

Specifies the duration, in minutes, that a form's session state can remain active. The default value is 1440.

The type must be a non-negative integer value in the range of 0 to 999999.

AllowEmbeddedSqlForDataConnections

Optional

System.String

Specifies a value indicating whether embedded SQL authentication can be used by browser-enabled form templates.

The type must be one of the following values: True, False (default)

AllowUdcAuthenticationForDataConnections

Optional

System.String

Specifies that authentication information in a Universal Data Connection (UDC) file can be used.

The type must be one of the following values: True (default), False

AllowUserFormBrowserEnabling

Optional

System.String

Specifies that users can browser-enable form templates that do not contain form code, require full trust, enable rendering on a mobile device, or use a data connection managed by a server administrator.

The type must be one of the following values: True (default), False

AllowUserFormBrowserRendering

Optional

System.String

Specifies browser-enabled form templates will be rendered by InfoPath Forms Services.

The type must be one of the following values: True (default), False

AllowUserFormCrossDomainDataConnections

Optional

System.String

Specifies that data connections to data sources located in a different domain can be queried.

The type must be one of the following values: True, False (default)

AllowViewState

Optional

System.String

Defines the location to store form session state. View state when True, or Session State Service when False.

The type must be one of the following values: True, False (default)

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.

Note:
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.

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

DefaultDataConnectionTimeout

Optional

System.Nullable

Specifies the default data connection timeout in milliseconds. The default value is 10000 (10 seconds).

The type must be a non-negative integer and less than or equal to the value set for MaxDataConnectionTimeout.

Identity

Optional

Microsoft.Office.InfoPath.Server.Cmdlet.SPFormsServicePipeBind

Specifies of the forms service to update.

The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a forms service (for example, FormsService1); or an instance of a valid SPFormsService object.

MaxDataConnectionResponseSize

Optional

System.Nullable

Specifies the maximum size allowed for a data connection response. The default value is 15000 Kilobytes.

The type must be a non-negative integer

MaxDataConnectionRoundTrip

Optional

System.Nullable

MaxDataConnectionTimeout

Optional

System.Nullable

Specifies the maximum data connection timeout in milliseconds. The default value is 20000 (20 seconds).

The type must be a non-negative integer and less than or equal to 999999.

MaxFormLoadTime

Optional

System.Nullable

MaxPostbacksPerSession

Optional

System.Nullable

Specifies the value of the maximum postbacks an instance of a browser-enabled form template can make to the forms service. The default value is 20.

The type must be a non-negative integer and less than or equal to 999999.

MaxSizeOfFormSessionState

Optional

System.Nullable

Specifies the value of the maximum size in kilobytes of session state an instance of a browser-enabled form template can use. The default value is 4096.

The type must be a non-negative integer and less than or equal to 999999.

MaxUserActionsPerPostback

Optional

System.Nullable

Specifies the maximum user actions per postback. The default value is 200.

The type must be a non-negative integer and less than or equal to 999999.

RequireSslForDataConnections

Optional

System.String

Specifies the Secure Sockets Layer (SSL) requirement value. If data connections in browser-enabled form templates require Basic Authentication or Digest Authentication, a password will be sent over the network. Set this value to True to require an SSL-encrypted connection for these authentication types.

The type must be one of the following values: True (default), False.

ViewStateThreshold

Optional

System.Nullable

Specifies the maximum size in kilobytes of the session state when stored in the form view. The default value is 40.

The type must be a non-negative integer and less than or equal to 99999999.

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 Set-SPInfoPathFormsService cmdlet modifies the settings for the InfoPath Forms Services.

Input Types

Return Types

Errors

Error | Description

Exceptions

Exceptions | Description

Example

--------------EXAMPLE 1-----------------
Copy Code
Set-SPInfoPathFormsService -AllowUserFormBrowserEnabling $true -AllowUserFormBrowserRendering $false

This example modifies the AllowUserFormBrowserEnabling and AllowUserFormBrowserRendering parameter values.

--------------EXAMPLE 2-----------------
Copy Code
Set-SPInfoPathFormsService -AllowViewState $true -ViewStateThreshold 40961

This example modifies the AllowViewState and ViewStateThreshold parameter values.


Set-SPInfoPathFormTemplate
Example
[image]

Sets properties of an InfoPath form template.

Set-SPInfoPathFormTemplate -Identity <SPFormTemplatePipeBind> [-AssignmentCollection <SPAssignmentCollection>] [-Category <String>] [-Confirm [<SwitchParameter>]] [-WhatIf [<SwitchParameter>]]

Parameters

Parameter Required Type Description

Identity

Required

Microsoft.Office.InfoPath.Server.Cmdlet.SPFormTemplatePipeBind

Specifies the InfoPath form template to update.

The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a form template (for example, InfoPathFormTemplate1); a valid name of a form template files (for example, FormTemplateFile1.xsn); or an instance of a valid SPFormTemplate object.

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.

Note:
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.

Category

Optional

System.String

Specifies the category of the form template. The category name can have a maximum of 255 characters.

The type must be a valid name of a form template category; for example, FormTemplateCategory1.

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

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 Set-SPInfoPathFormsTemplate cmdlet modifies the category of a form template or to specify the browser streams for the form template.

Input Types

Return Types

Errors

Error | Description

Exceptions

Exceptions | Description

Example

---------------EXAMPLE--------------
Copy Code
Set-InfoPathFormTemplate -Identity "Sample.xsn" -Category "WorkFlowCategory"
Copy Code
Set-InfoPathFormTemplate -Identity "Sample.xsn" -Category "WorkFlowCategory"

This example modifies a form template for a specified name and category.


Set-SPInfoPathWebServiceProxy
Example
[image]

Sets parameters for an existing SharePoint Web service application.

Set-SPInfoPathWebServiceProxy -Identity <SPWebServiceProxyPipeBind> [-AllowForUserForms <String>] [-AllowWebServiceProxy <String>] [-AssignmentCollection <SPAssignmentCollection>] [-Confirm [<SwitchParameter>]] [-WhatIf [<SwitchParameter>]]

Parameters

Parameter Required Type Description

Identity

Required

Microsoft.Office.InfoPath.Server.Cmdlet.SPWebServiceProxyPipeBind

Specifies the SharePoint Web service application proxy to update.

The type must be a valid URL, in the form http://server_name; a valid name of a Web application (for example, WebApp1); a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; or an instance of a valid SPWebServiceProxy object.

AllowForUserForms

Optional

System.String

Specifies that a form opened in the InfoPath client can use the InfoPath Forms Services Web service proxy to connect to a Web service. This parameter can be set only when AllowWebServiceProxy is set to True.

One of the following: True, False (default)

AllowWebServiceProxy

Optional

System.String

Specifies that browser-enabled form templates can use the InfoPath Forms Services Web service proxy to connect to a Web service.

One of the following: True, False (default)

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.

Note:
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.

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

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 Set-SPInfoPathWebServiceProxy cmdlet configures exposed parameters for an existing SharePoint Web application.

Input Types

Return Types

Errors

Error | Description

Exceptions

Exceptions | Description

Example

--------------EXAMPLE-----------------
Copy Code
Set-SPInfoPathWebServiceProxy -Identity "http://server_name" -AllowWebServiceProxy $true

This example sets the WebServiceProxy for a Web application.


Start-SPInfoPathFormTemplate
Example
[image]

Unquieces an InfoPath form template on a farm after an upgrade.

Start-SPInfoPathFormTemplate -Identity <SPFormTemplatePipeBind> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm [<SwitchParameter>]] [-WhatIf [<SwitchParameter>]]

Parameters

Parameter Required Type Description

Identity

Required

Microsoft.Office.InfoPath.Server.Cmdlet.SPFormTemplatePipeBind

Specifies the InfoPath form template to start.

The type must be a valid URL, in the form http://server_name; a valid name of a Web application (for example, WebApp1); a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; or an instance of a valid SPWebServiceProxy object.

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.

Note:
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.

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

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 Start-SPInfoPathFormTemplate cmdlet unquieces, or activates, a form template after the form is upgraded. While a form is updated it is quieced, which disables access to the form.

Input Types

Return Types

Errors

Error | Description

Exceptions

Exceptions | Description

Example

---------------EXAMPLE--------------
Copy Code
Start-SPInfoPathFormTemplate -Identity formName.xsn

This example activates a form with a specified name.


Stop-SPInfoPathFormTemplate
Example
[image]

Disables an InfoPath form template on a farm before an upgrade.

Stop-SPInfoPathFormTemplate -Identity <SPFormTemplatePipeBind> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm [<SwitchParameter>]] [-TimeLeft <Nullable>] [-WhatIf [<SwitchParameter>]]

Parameters

Parameter Required Type Description

Identity

Required

Microsoft.Office.InfoPath.Server.Cmdlet.SPFormTemplatePipeBind

Specifies the InfoPath form template to start.

The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a form template (for example, InfoPathFormTemplate1); a valid name of a form template files (for example, FormTemplateFile1.xsn); or an instance of a valid SPFormTemplate object.

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.

Note:
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.

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

TimeLeft

Optional

System.Nullable

Specifies the time duration, in minutes, before the form template will be quieced. The default value is 0.

An integer value in the range from 0 to 1440.

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 Stop-SPInfoPathFormTemplate cmdlet quieces, or disables, a form template before upgrading the form. Before a form is updated it is quieced, which disables access to the form. Use Start-SPIPFormTemplate to unquiece, or activate, a form template after the form is upgraded.

Input Types

Return Types

Errors

Error | Description

Exceptions

Exceptions | Description

Example

---------------EXAMPLE--------------
Copy Code
Stop-SPInfoPathFormTemplate -Identity formName.xsn

This example disables a form template for a specified name.


Test-SPInfoPathFormTemplate
Example
[image]

Validates that a form template can be browser-enabled.

Test-SPInfoPathFormTemplate -Path <String> [-AssignmentCollection <SPAssignmentCollection>]

Parameters

Parameter Required Type Description

Path

Required

System.String

Specifies the path and name of the form template to install.

The type must be a valid path and file name of a form template, in the form:

  • C:\folder_name\formtemplate_name

  • \\server_name\folder_name\formtemplate_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.

Note:
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.

Detailed Description

The Test-SPInfoPathFormTemplate cmdlet validates that a form template can be browser-enabled.

Input Types

Return Types

Errors

Error | Description

Exceptions

Exceptions | Description

Example

---------------EXAMPLE--------------
Copy Code
Test-SPInfoPathFormTemplate -Identity formName.xsn

This example validates a form template for a specified name.


Uninstall-SPInfoPathFormTemplate
Example
[image]

Removes a form template from a farm.

Uninstall-SPInfoPathFormTemplate -Identity <SPFormTemplatePipeBind> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm [<SwitchParameter>]] [-WhatIf [<SwitchParameter>]]

Parameters

Parameter Required Type Description

Identity

Required

Microsoft.Office.InfoPath.Server.Cmdlet.SPFormTemplatePipeBind

Specifies the InfoPath form template to uninstall.

The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a form template (for example, InfoPathFormTemplate1); a valid name of a form template files (for example, FormTemplateFile1.xsn); or an instance of a valid SPFormTemplate object.

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.

Note:
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.

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

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 Uninstall-SPInfoPathFormTemplate cmdlet removes a specified form template from a farm.

Input Types

Return Types

Errors

Error | Description

Exceptions

Exceptions | Description

Example

--------------EXAMPLE-----------------
Copy Code
Uninstall-SPInfoPathFormTemplate -Identity formName.xsn

This example removes a form template from a farm.


Update-SPInfoPathFormTemplate
Example
[image]

Upgrades all forms templates on the farm.

Update-SPInfoPathFormTemplate [-AssignmentCollection <SPAssignmentCollection>] [-Confirm [<SwitchParameter>]] [-WhatIf [<SwitchParameter>]]

Parameters

Parameter Required Type Description

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.

Note:
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.

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

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-SPInfoPathFormTemplate cmdlet upgrades all the form templates on a farm that were deployed by an administrator. Use this cmdlet after upgrading the farm to a new version.

Input Types

Return Types

Errors

Error | Description

Exceptions

Exceptions | Description

Example

---------------EXAMPLE--------------
Copy Code
Update-SPInfoPathFormTemplate

This example updates form templates on the entire farm.


Update-SPInfoPathUrl
Example
[image]

Executes InfoPath XSN/UDC fix-up on SharePoint Services.

Update-SPInfoPathUrl -WebApplication <SPWebApplicationPipeBind> -Find <Uri> -Replace <Uri> [-AssignmentCollection <SPAssignmentCollection>] [-CentralAdministrationFiles <SwitchParameter>] [-Confirm [<SwitchParameter>]] [-PrepForGradualUpgrade <SwitchParameter>] [-Scan <SwitchParameter>] [-WhatIf [<SwitchParameter>]]
Update-SPInfoPathUrl -ContentDatabase <SPContentDatabase> -Find <Uri> -Replace <Uri> [-AssignmentCollection <SPAssignmentCollection>] [-CentralAdministrationFiles <SwitchParameter>] [-Confirm [<SwitchParameter>]] [-PrepForGradualUpgrade <SwitchParameter>] [-Scan <SwitchParameter>] [-WhatIf [<SwitchParameter>]]
Update-SPInfoPathUrl -Site <SPSitePipeBind> -Find <Uri> -Replace <Uri> [-AssignmentCollection <SPAssignmentCollection>] [-CentralAdministrationFiles <SwitchParameter>] [-Confirm [<SwitchParameter>]] [-PrepForGradualUpgrade <SwitchParameter>] [-Scan <SwitchParameter>] [-WhatIf [<SwitchParameter>]]
Update-SPInfoPathUrl -File <Uri> -Find <Uri> -Replace <Uri> [-AssignmentCollection <SPAssignmentCollection>] [-CentralAdministrationFiles <SwitchParameter>] [-Confirm [<SwitchParameter>]] [-PrepForGradualUpgrade <SwitchParameter>] [-Scan <SwitchParameter>] [-WhatIf [<SwitchParameter>]]

Parameters

Parameter Set 1

Parameter

Required

Type

Description

WebApplication

Required

Microsoft.SharePoint.PowerShell.SPWebApplicationPipeBind

Specifies the parent SharePoint Web application where the update will start.

The type must be a valid URL, in the form http://server_name; a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of SharePoint Web application (for example, MyOfficeApp1); or an instance of a valid SPWebApplication object.

Find

Required

System.Uri

Specifies the URL to find.

The type must be a valid URL, in the form http://server_name.

Replace

Required

System.Uri

Specifies the URL to replace.

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.

Note:
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.

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

PrepForGradualUpgrade

Optional

System.Management.Automation.SwitchParameter

Specifies that gradualUpgradeURL XML is inserted into the form template and SPFile persisted properties are added.

Scan

Optional

System.Management.Automation.SwitchParameter

Specifies that functionality is scanned.

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

Parameter Set 2

Parameter

Required

Type

Description

ContentDatabase

Required

Microsoft.SharePoint.Administration.SPContentDatabase

Specifies the parent content database where the update will start.

The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a content database (for example, SPContent DB1); or an instance of a valid SPContentDatabase object.

Find

Required

System.Uri

Specifies the URL to find.

The type must be a valid URL, in the form http://server_name.

Replace

Required

System.Uri

Specifies the URL to replace.

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.

Note:
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.

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

PrepForGradualUpgrade

Optional

System.Management.Automation.SwitchParameter

Specifies that gradualUpgradeURL XML is inserted into the form template and SPFile persisted properties are added.

Scan

Optional

System.Management.Automation.SwitchParameter

Specifies that functionality is scanned.

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

Parameter Set 3

Parameter

Required

Type

Description

Site

Required

Microsoft.SharePoint.PowerShell.SPSitePipeBind

Specifies the parent site collection where the update will start.

The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid URL, in the form http://server_name; or an instance of a valid SPSite object.

Find

Required

System.Uri

Specifies the URL to find.

The type must be a valid URL, in the form http://server_name.

Replace

Required

System.Uri

Specifies the URL to replace.

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.

Note:
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.

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

PrepForGradualUpgrade

Optional

System.Management.Automation.SwitchParameter

Specifies that gradualUpgradeURL XML is inserted into the form template and SPFile persisted properties are added.

Scan

Optional

System.Management.Automation.SwitchParameter

Specifies that functionality is scanned.

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

Parameter Set 4

Parameter

Required

Type

Description

File

Required

System.Uri

Specifies the parent file in a SharePoint Web site where the update will start.

Find

Required

System.Uri

Specifies the URL to find.

The type must be a valid URL, in the form http://server_name.

Replace

Required

System.Uri

Specifies the URL to replace.

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.

Note:
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.

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

PrepForGradualUpgrade

Optional

System.Management.Automation.SwitchParameter

Specifies that gradualUpgradeURL XML is inserted into the form template and SPFile persisted properties are added.

Scan

Optional

System.Management.Automation.SwitchParameter

Specifies that functionality is scanned.

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-SPInfoPathUrls cmdlet updates form templates (XSN files) and universal data connections (UDCX files) located on the SharePoint Central Administration Web site.

This cmdlet supports parameter sets for Web application, Content Database, Site, and File.

Input Types

Return Types

Errors

Error | Description

Exceptions

Exceptions | Description

Example

--------------EXAMPLE-------------------
Copy Code
Update-SPInfoPathUrl -Site "http://server_name" -Find "http://findUrl" -Replace "http://ReplaceUrl"

This example updates connection settings.