Share via


New-SPContentDeploymentPath

 

適用版本: SharePoint Server 2010

上次修改主題的時間: 2015-03-09

這會建立新的內容部署路徑。

Syntax

New-SPContentDeploymentPath -DestinationCentralAdministrationURL <Uri> -DestinationSPSite <String> -DestinationSPWebApplication <Uri> -Name <String> -PathAccount <PSCredential> -SourceSPSite <SPSitePipeBind> -SourceSPWebApplication <SPWebApplicationPipeBind> [-AssignmentCollection <SPAssignmentCollection>] [-Authentication <Basic | Windows>] [-CompressionEnabled <SwitchParameter>] [-Confirm [<SwitchParameter>]] [-DeploySecurityInformation <None | WssOnly | All>] [-DeployUserNamesEnabled <SwitchParameter>] [-Description <String>] [-EventReceiversEnabled <SwitchParameter>] [-KeepTemporaryFilesOptions <Never | Always | Failure>] [-PathEnabled <SwitchParameter>] [-WhatIf [<SwitchParameter>]]

詳細描述

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

如需 Windows PowerShell for SharePoint Server 2010 的權限及最新資訊,請參閱 TechNet (https://go.microsoft.com/fwlink/?LinkId=163183)。

Parameters

參數 必要 類型 描述

DestinationCentralAdministrationURL

必要

System.Uri

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

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

DestinationSPSite

必要

Microsoft.SharePoint.PowerShell.SPSitePipeBind

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

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

DestinationSPWebApplication

必要

Microsoft.SharePoint.PowerShell.SPWebApplicationPipeBind

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

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

Name

必要

System.String

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

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

PathAccount

必要

System.Management.Automation.PSCredential

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

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

SourceSPSite

必要

Microsoft.SharePoint.PowerShell.SPSitePipeBind

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

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

SourceSPWebApplication

必要

Microsoft.SharePoint.PowerShell.SPWebApplicationPipeBind

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

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

AssignmentCollection

選用

Microsoft.SharePoint.PowerShell.SPAssignmentCollection

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

注意

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

Authentication

選用

Microsoft.SharePoint.Publishing.Administration.PathAuthenticationOption

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

其類型必須為下列值之一:WindowsAuthBasicAuth

CompressionEnabled

選用

System.Management.Automation.SwitchParameter

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

Confirm

選用

System.Management.Automation.SwitchParameter

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

DeploySecurityInformation

選用

Microsoft.SharePoint.Deployment.SPIncludeSecurity

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

其類型必須為下列值之一:NoneAllRoleDefinitionsOnly

DeployUserNamesEnabled

選用

System.Management.Automation.SwitchParameter

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

有效值為下列其中一個:

- $True 保留原始作者及編輯者資訊、時間及日期戳記,以及使用者查閱值。

- $False 保留原始日期及時間戳記,但是會以系統帳戶取代作者及編輯者資料,並以空字串 ("") 取代使用者查閱值。

Description

選用

System.String

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

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

EventReceiversEnabled

選用

System.Management.Automation.SwitchParameter

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

KeepTemporaryFilesOptions

選用

Microsoft.SharePoint.Publishing.Administration.TemporaryFilesOption

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

其類型必須為下列值之一:NeverAlwaysOnFailure

PathEnabled

選用

System.Management.Automation.SwitchParameter

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

WhatIf

選用

System.Management.Automation.SwitchParameter

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

輸入類型

傳回類型

Example

-----------------範例----------------------

$source = Get-SPSite "http://source/"

$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

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

See Also

Reference

Get-SPContentDeploymentPath
Remove-SPContentDeploymentPath
Set-SPContentDeploymentPath