共用方式為


New-SPContentDeploymentPath

建立新的內容部署路徑。

語法

Default (預設值)

New-SPContentDeploymentPath
    -DestinationCentralAdministrationURL <Uri>
    -DestinationSPSite <String>
    -DestinationSPWebApplication <Uri>
    -Name <String>
    -PathAccount <PSCredential>
    -SourceSPSite <SPSitePipeBind>
    -SourceSPWebApplication <SPWebApplicationPipeBind>
    [-AssignmentCollection <SPAssignmentCollection>]
    [-Authentication <PathAuthenticationOption>]
    [-CompressionEnabled]
    [-Confirm]
    [-DeploySecurityInformation <SPIncludeSecurity>]
    [-DeployUserNamesEnabled]
    [-Description <String>]
    [-EventReceiversEnabled]
    [-KeepTemporaryFilesOptions <TemporaryFilesOption>]
    [-PathEnabled]
    [-WhatIf]
    [<CommonParameters>]

Description

New-SPContentDeploymentPath Cmdlet 會新增內容部署工作的新內容部署路徑。

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

範例

C:\PS>$source = Get-SPSite "http://source/"

C:\PS>$credentials=Get-Credential

New-SPContentDeploymentPath -Name "Deployment Path" -SourceSPWebApplication $source.WebApplication -SourceSPSite $source DestinationCentralAdministrationURL "http://destination:8080" -DestinationSPWebApplication "http://destination" -DestinationSPSite "http://destination" -KeepTemporaryFilesOptions "Failure" -PathAccount $credentials -PathEnabled:$true

此範例會建立稱為部署路徑的新部署路徑,以將 來源 http://source 連線到目的地, http://destination. 此路徑會啟用,且會設定為在工作失敗時保留暫存檔案。

參數

-AssignmentCollection

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

管理物件以適當處置它們。 使用 SPWeb 或 SPSite 等物件可能會耗用大量的記憶體,因此在 Windows PowerShell 指令碼中使用這些物件時,必須適當地管理記憶體。 您可以使用 SPAssignment 物件將物件指派給變數,並在不需要時處置這些物件,以釋放記憶體。 使用 SPWeb、SPSite 或 SPSiteAdministration 物件時,若未使用指派集合或 Global 參數,將會自動處置這些物件。

使用 Global 參數時,所有物件會包含在全域儲存區內。 若未立即使用物件,或未使用 Stop-SPAssignment 命令處置物件,將會發生記憶體不足的狀況。

參數屬性

類型:SPAssignmentCollection
預設值:None
支援萬用字元:False
不要顯示:False

參數集

(All)
Position:Named
必要:False
來自管線的值:True
來自管線按屬性名稱的值:False
來自剩餘引數的值:False

-Authentication

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

這會設定 Windows 驗證類型,前端 Web 伺服器會用來與目的地 Web 應用程式通訊。

其類型必須為下列值之一:WindowsAuth 或 BasicAuth。

參數屬性

類型:PathAuthenticationOption
預設值:None
支援萬用字元:False
不要顯示:False

參數集

(All)
Position:Named
必要:False
來自管線的值:False
來自管線按屬性名稱的值:False
來自剩餘引數的值:False

-CompressionEnabled

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

這會在匯出期間開啟壓縮。

參數屬性

類型:SwitchParameter
預設值:None
支援萬用字元:False
不要顯示:False

參數集

(All)
Position:Named
必要:False
來自管線的值:False
來自管線按屬性名稱的值:False
來自剩餘引數的值:False

-Confirm

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

在執行命令之前,提示您確認操作。 如需詳細資訊,請輸入下列命令:get-help about_commonparameters

參數屬性

類型:SwitchParameter
預設值:None
支援萬用字元:False
不要顯示:False
別名:cf

參數集

(All)
Position:Named
必要:False
來自管線的值:False
來自管線按屬性名稱的值:False
來自剩餘引數的值:False

-DeploySecurityInformation

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

這會指定此內容部署路徑在匯出作業期間要包含的使用者和群組資訊。 SixMonths

此類型必須是下列其中一個值:None、All 或 WssOnly- 僅適用於 SharePoint Foundation 安全性設定。 包含使用者成員資格與像是預設角色的角色指派,例如 Web Designer 或任何從預設角色延伸出來的自訂角色。 每項物件的存取控制清單 (ACL) 都會移轉。 並不會包含 DAP 或 LDAP 伺服器中所定義的任何使用者資訊。

參數屬性

類型:SPIncludeSecurity
預設值:None
支援萬用字元:False
不要顯示:False

參數集

(All)
Position:Named
必要:False
來自管線的值:False
來自管線按屬性名稱的值:False
來自剩餘引數的值:False

-DeployUserNamesEnabled

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

指定在部署期間是否要包括使用者名稱。

有效值為下列其中一個:

  • $True保留原始作者和編輯器資訊、時間和日期戳記,以及使用者查閱值。
  • $False保留原始日期和時間戳,但以系統帳戶取代作者和編輯器數據,並將使用者查閱值取代為空字串 (“”) 。

參數屬性

類型:SwitchParameter
預設值:None
支援萬用字元:False
不要顯示:False

參數集

(All)
Position:Named
必要:False
來自管線的值:False
來自管線按屬性名稱的值:False
來自剩餘引數的值:False

-Description

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

這會設定內容部署路徑的說明。 說明最多可包含 4096 個英數字元。

其類型必須為有效的字串。

參數屬性

類型:String
預設值:None
支援萬用字元:False
不要顯示:False

參數集

(All)
Position:Named
必要:False
來自管線的值:False
來自管線按屬性名稱的值:False
來自剩餘引數的值:False

-DestinationCentralAdministrationURL

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

這會指定目的地伺服器陣列的 SharePoint 管理中心 URL。

類型必須是有效的 URL,格式為 http://server_name.

參數屬性

類型:Uri
預設值:None
支援萬用字元:False
不要顯示:False

參數集

(All)
Position:Named
必要:True
來自管線的值:False
來自管線按屬性名稱的值:False
來自剩餘引數的值:False

-DestinationSPSite

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

這會指定目的地網站集合。

此類型必須是格式為 12345678-90ab-cdef-1234-567890bcdefgh 的有效 GUID;格式為 http://server_name 的有效 URL;或有效之 SPSite 物件的執行個體。

參數屬性

類型:String
預設值:None
支援萬用字元:False
不要顯示:False

參數集

(All)
Position:Named
必要:True
來自管線的值:False
來自管線按屬性名稱的值:False
來自剩餘引數的值:False

-DestinationSPWebApplication

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

這會指定目的地 Web 應用程式。

此類型必須是格式為 的有效 URL http://server_name;格式為 12345678-90ab-cdef-1234-567890bcdefgh 的有效 GUID;有效的 Web 應用程式名稱 (例如 MyOfficeApp1) ;或有效 SPWebApplication 物件的實例。

參數屬性

類型:Uri
預設值:None
支援萬用字元:False
不要顯示:False

參數集

(All)
Position:Named
必要:True
來自管線的值:False
來自管線按屬性名稱的值:False
來自剩餘引數的值:False

-EventReceiversEnabled

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

這會在匯入期間開啟事件接收器。

參數屬性

類型:SwitchParameter
預設值:None
支援萬用字元:False
不要顯示:False

參數集

(All)
Position:Named
必要:False
來自管線的值:False
來自管線按屬性名稱的值:False
來自剩餘引數的值:False

-KeepTemporaryFilesOptions

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

這會指定內容部署完成之後要保留暫存檔。

其類型必須為下列值之一:Never、Always 或 OnFailure。

參數屬性

類型:TemporaryFilesOption
預設值:None
支援萬用字元:False
不要顯示:False

參數集

(All)
Position:Named
必要:False
來自管線的值:False
來自管線按屬性名稱的值:False
來自剩餘引數的值:False

-Name

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

這會指定新內容部署路徑的名稱。

其類型必須為內容部署路徑的有效名稱;例如 DeployPath1。

參數屬性

類型:String
預設值:None
支援萬用字元:False
不要顯示:False

參數集

(All)
Position:Named
必要:True
來自管線的值:False
來自管線按屬性名稱的值:False
來自剩餘引數的值:False

-PathAccount

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

這會指定使用者識別碼,且使用者是目的地伺服器陣列之管理中心頁面上的管理員。

其類型必須為有效的 SharePoint 使用者。

參數屬性

類型:PSCredential
預設值:None
支援萬用字元:False
不要顯示:False

參數集

(All)
Position:Named
必要:True
來自管線的值:False
來自管線按屬性名稱的值:False
來自剩餘引數的值:False

-PathEnabled

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

這會啟用新的內容部署路徑。

參數屬性

類型:SwitchParameter
預設值:None
支援萬用字元:False
不要顯示:False

參數集

(All)
Position:Named
必要:False
來自管線的值:False
來自管線按屬性名稱的值:False
來自剩餘引數的值:False

-SourceSPSite

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

這會指定部署路徑的來源網站集合。 這必須為 SourceSPWebApplication 參數中所指定來源中的網站集合。

此類型必須是格式為 12345678-90ab-cdef-1234-567890bcdefgh 的有效 GUID;格式為 http://server_name 的有效 URL;或有效之 SPSite 物件的執行個體。

參數屬性

類型:SPSitePipeBind
預設值:None
支援萬用字元:False
不要顯示:False

參數集

(All)
Position:Named
必要:True
來自管線的值:False
來自管線按屬性名稱的值:False
來自剩餘引數的值:False

-SourceSPWebApplication

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

指定部署路徑的來源 Web 應用程式。

此類型必須是格式為 http://server_name 的有效 URL;格式為 12345678-90ab-cdef-1234-567890bcdefgh 的有效 GUID;有效的 SharePoint Web 應用程式名稱 (例如 MyOfficeApp1);或有效之 SPWebApplication 物件的執行個體。

參數屬性

類型:SPWebApplicationPipeBind
預設值:None
支援萬用字元:False
不要顯示:False

參數集

(All)
Position:Named
必要:True
來自管線的值:False
來自管線按屬性名稱的值:False
來自剩餘引數的值:False

-WhatIf

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

顯示訊息會描述命令的功效而不執行命令。 如需詳細資訊,請輸入下列命令:get-help about_commonparameters

參數屬性

類型:SwitchParameter
預設值: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