共用方式為


Set-SPContentDeploymentJob

設定內容部署工作的屬性。

語法

Default (預設值)

Set-SPContentDeploymentJob
    [-Identity] <SPContentDeploymentJobPipeBind>
    [-AssignmentCollection <SPAssignmentCollection>]
    [-Confirm]
    [-Description <String>]
    [-EmailAddresses <String[]>]
    [-EmailNotifications <ContentDeploymentNotificationSettings>]
    [-HostingSupportEnabled]
    [-IncrementalEnabled]
    [-Name <String>]
    [-Schedule <String>]
    [-ScheduleEnabled]
    [-Scope <SPWebPipeBind[]>]
    [-SqlSnapshotSetting <ContentDeploymentSqlSnapshotSetting>]
    [-WhatIf]
    [<CommonParameters>]

Description

Cmdlet Set-SPContentDeploymentJob 會設定內容部署作業的屬性。

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

範例

Get-SPContentDeploymentJob "Job 1" | Set-SPContentDeploymentJob -Schedule "hourly between 0 and 59" -ScheduleEnabled:$true

本範例會將名為 Job 1 的部署作業設定為每小時執行一次。

參數

-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

-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

-Description

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

這會指定內容部署工作的說明。 名稱最多可包含 4096 個英數字元。

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

參數屬性

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

參數集

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

-EmailAddresses

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

這會指定使用者的電子郵件地址,這些都是會收到有關此 ContentDeploymentJob 物件之電子郵件通知的使用者。

其類型必須為有效之電子郵件地址的清單。

參數屬性

類型:

String[]

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

參數集

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

-EmailNotifications

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

這會指定如何傳送有關此 ContentDeploymentJob 物件的電子郵件通知。

其類型必須為下列其中之一:

- Never 會指定無論工作成功或失敗,都不傳送電子郵件通知。

  • Success 指定如果內容部署作業成功,將會傳送電子郵件通知。
  • 失敗指定如果內容部署作業失敗,將會傳送電子郵件通知。
  • 一律指定當作業成功或失敗時,將會傳送電子郵件通知。

參數屬性

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

參數集

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

-HostingSupportEnabled

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

啟用特殊裝載行為。 預設值為 False。

一般而言,會使用 SharePoint 管理中心網站來啟用或停用內容部署工作。 但是,在裝載的情況下,承租人管理員並沒有存取管理中心頁面的權限,而無法設定工作。 因此,當 HostingSupportEnabled 參數設定為 True 時,主控者會建立工作,好讓承租人得以從承租人管理網站啟用或停用部署工作。

參數屬性

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

參數集

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

-Identity

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

指定要更新的內容部署作業。

其類型必須為有效的 GUID,且格式為 12345678-90ab-cdef-1234-567890bcdefgh;內容部署工作的有效名稱 (例如,DeployJob1);或是有效之 SPContentDeploymentJob 物件的執行個體。

參數屬性

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

參數集

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

-IncrementalEnabled

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

這會指定只將累加變更部署到目的地網站集合。

參數屬性

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

參數集

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

-Name

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

這會指定新內容部署工作的名稱。

其類型必須為內容部署工作的有效名稱;例如 DeployJob1。

參數屬性

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

參數集

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

-Schedule

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

這會設定部署工作的排程。

其類型必須為有效的 SPSchedule 物件。

參數屬性

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

參數集

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

-ScheduleEnabled

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

啟用部署作業的排程。 如果未啟用排程,則只能手動執行作業。

參數屬性

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

參數集

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

-Scope

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

這會設定部署工作的範圍。 傳入的SPSite對象必須存在於來源網站集合的目前路徑中。 預設範圍是整個網站集合。 有效值包括SPWeb物件或SPWeb物件的陣列。

此類型必須是格式為 12345678-90ab-cdef-1234-567890bcdefgh 的有效 GUID;SharePoint Foundation 網站的有效名稱 (例如 MySPSite1) ;或有效SPWeb對象的實例。

參數屬性

類型:

SPWebPipeBind[]

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

參數集

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

-SqlSnapshotSetting

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

使用 SQL Server 來備份 SharePoint Foundation 內容資料庫。

此類型必須是下列其中一個值:None 或 CreateNew。

參數屬性

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

參數集

(All)
Position:Named
必要:False
來自管線的值: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