Set-OBSchedule
Sets the OBSchedule object, which includes the days of the week and times of day to create daily backups, for the backup policy (OBPolicy object).
语法
Default (默认值)
Set-OBSchedule
[-Policy] <CBPolicy>
[-Schedule] <CBSchedule>
[-Confirm]
[-WhatIf]
说明
The Set-OBSchedule cmdlet sets the OBSchedule object, which includes the days of the week and times of day to create daily backups, for the backup policy (OBPolicy object).
This cmdlet sets the OBPolicy object with references to the days of the week and times of day to create backups.
This cmdlet supports WhatIf and Confirm parameters with a medium impact. The medium impact signifies that the cmdlet will not prompt the user for confirmation by default. The WhatIf parameter gives a verbose description of what the cmdlet does without performing any operation. The Confirm parameter specifies whether the cmdlet should prompt the user. Using -Confirm:$FALSE will override the prompt.
To use Microsoft Azure Backup cmdlets, the user needs to be an administrator on the protected machine.
示例
EXAMPLE 1
$policy = Get-OBPolicy
Get-OBSchedule $policy | Set-OBSchedule $policy
This example sets a protection policy.
EXAMPLE 2
$sch = New-OBSchedule -DaysOfWeek Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday -TimesOfDay 12:00,16:00,20:00
New-OBPolicy | Set-OBSchedule -Schedule $sch
This example sets a new protection policy.
参数
-Confirm
Prompts you for confirmation before running the cmdlet.
参数属性
类型: | SwitchParameter |
默认值: | False |
支持通配符: | False |
不显示: | False |
参数集
(All)
Position: | Named |
必需: | False |
来自管道的值: | False |
来自管道的值(按属性名称): | False |
来自剩余参数的值: | False |
-Policy
Specifies the policy which the schedule is being set.
参数属性
类型: | CBPolicy |
默认值: | None |
支持通配符: | False |
不显示: | False |
参数集
(All)
Position: | 2 |
必需: | True |
来自管道的值: | True |
来自管道的值(按属性名称): | False |
来自剩余参数的值: | False |
-Schedule
Specifies the schedule to be set for the policy.
参数属性
类型: | CBSchedule |
默认值: | None |
支持通配符: | False |
不显示: | False |
参数集
(All)
Position: | 3 |
必需: | True |
来自管道的值: | True |
来自管道的值(按属性名称): | False |
来自剩余参数的值: | False |
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
参数属性
类型: | SwitchParameter |
默认值: | False |
支持通配符: | False |
不显示: | False |
参数集
(All)
Position: | Named |
必需: | False |
来自管道的值: | False |
来自管道的值(按属性名称): | False |
来自剩余参数的值: | False |