Set-SPContentDeploymentJob
設定內容部署工作的屬性。
Syntax
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
管理物件以適當處置它們。 使用 SPWeb 或 SPSite 等物件可能會耗用大量的記憶體,因此在 Windows PowerShell 指令碼中使用這些物件時,必須適當地管理記憶體。 您可以使用 SPAssignment 物件將物件指派給變數,並在不需要時處置這些物件,以釋放記憶體。 使用 SPWeb、SPSite 或 SPSiteAdministration 物件時,若未使用指派集合或 Global 參數,將會自動處置這些物件。
使用 Global 參數時,所有物件會包含在全域儲存區內。
如果不立即使用物件,或使用 Stop-SPAssignment
命令加以捨棄,則可能會有記憶體不足的狀況發生。
Type: | SPAssignmentCollection |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-Confirm
在執行命令之前,提示您確認操作。
如需詳細資訊,請輸入下列命令:get-help about_commonparameters
。
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-Description
這會指定內容部署工作的說明。 名稱最多可包含 4096 個英數字元。
其類型必須為有效的字串。
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-EmailAddresses
這會指定使用者的電子郵件地址,這些都是會收到有關此 ContentDeploymentJob 物件之電子郵件通知的使用者。
其類型必須為有效之電子郵件地址的清單。
Type: | String[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-EmailNotifications
這會指定如何傳送有關此 ContentDeploymentJob 物件的電子郵件通知。
其類型必須為下列其中之一:
- Never 會指定無論工作成功或失敗,都不傳送電子郵件通知。
- Success 指定如果內容部署作業成功,將會傳送電子郵件通知。
- 失敗指定如果內容部署作業失敗,將會傳送電子郵件通知。
- 一律指定當作業成功或失敗時,將會傳送電子郵件通知。
Type: | ContentDeploymentNotificationSettings |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-HostingSupportEnabled
啟用特殊裝載行為。 預設值為 False。
一般而言,會使用 SharePoint 管理中心網站來啟用或停用內容部署工作。 但是,在裝載的情況下,承租人管理員並沒有存取管理中心頁面的權限,而無法設定工作。 因此,當 HostingSupportEnabled 參數設定為 True 時,主控者會建立工作,好讓承租人得以從承租人管理網站啟用或停用部署工作。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-Identity
指定要更新的內容部署作業。
其類型必須為有效的 GUID,且格式為 12345678-90ab-cdef-1234-567890bcdefgh;內容部署工作的有效名稱 (例如,DeployJob1);或是有效之 SPContentDeploymentJob 物件的執行個體。
Type: | SPContentDeploymentJobPipeBind |
Position: | 1 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-IncrementalEnabled
這會指定只將累加變更部署到目的地網站集合。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-Name
這會指定新內容部署工作的名稱。
其類型必須為內容部署工作的有效名稱;例如 DeployJob1。
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-Schedule
這會設定部署工作的排程。
其類型必須為有效的 SPSchedule 物件。
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-ScheduleEnabled
啟用部署作業的排程。 如果未啟用排程,則只能手動執行作業。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-Scope
這會設定部署工作的範圍。 傳入的 SPSite 物件必須存在於來源網站集合的目前路徑中。 預設範圍是整個網站集合。 有效值包括 SPWeb 物件或 SPWeb 物件的陣列。
此類型必須是格式為 12345678-90ab-cdef-1234-567890bcdefgh 的有效 GUID;SharePoint Foundation 網站的有效名稱 (例如 MySPSite1) ;或有效 SPWeb 物件的實例。
Type: | SPWebPipeBind[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-SqlSnapshotSetting
使用 SQL Server 來備份 SharePoint Foundation 內容資料庫。
此類型必須是下列其中一個值:None 或 CreateNew。
Type: | ContentDeploymentSqlSnapshotSetting |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-WhatIf
顯示訊息會描述命令的功效而不執行命令。
如需詳細資訊,請輸入下列命令:get-help about_commonparameters
。
Type: | SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |