Install-SPInfoPathFormTemplate

在伺服器陣列上安裝 InfoPath 表單範本。

Syntax

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

Description

Install-SPInfoPathFormTemplate Cmdlet 會在伺服器陣列上安裝 InfoPath 表單範本。

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

範例

---------------範例 1--------------

Install-SPInfoPathFormTemplate -Path c:\Form.xsn

此範例會將單一表單範本安裝到伺服器陣列。

---------------範例 2--------------

"FormTemplateFirst.xsn", "FormTemplateSecond.xsn", "FormTemplateThird.xsn" | Install-SPInfoPathFormTemplate

此範例會在伺服器陣列上安裝多個表單範本。

參數

-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

-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

-EnableGradualUpgrade

指定可以逐漸升級新表單。

  • 如果指定且表單範本檔案存在,則表單範本會逐漸升級,然後僅用於新的會話。
  • 如果未指定且表單範本不存在,則會在升級期間覆寫表單,然後用於擴充和新的會話。
  • 如果已指定且表單範本檔案不存在,請忽略 參數。
  • 如果未指定且檔案存在,系統會提示使用者升級,並在允許升級時使用漸進式升級。
Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition

-NoWait

指定表單範本安裝在背景中,而且不會顯示安裝進度。

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

-Path

指定要安裝之表單範本的路徑和名稱。

此類型必須是格式如下之有效表單範本路徑與檔案名稱:

  • C:\folder_name\formtemplate_name
  • \\server_name\folder_name\formtemplate_name
Type:String
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