Set-OBSchedule

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).

Syntax

Parameter Set: Default
Set-OBSchedule [-Policy] <CBPolicy> [-Schedule] <CBSchedule> [-Confirm] [-WhatIf] [ <CommonParameters>]

Detailed Description

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.

Parameters

-Policy<CBPolicy>

Specifies the policy which the schedule is being set.

Aliases

none

Required?

true

Position?

2

Default Value

none

Accept Pipeline Input?

True (ByValue)

Accept Wildcard Characters?

false

-Schedule<CBSchedule>

Specifies the schedule to be set for the policy.

Aliases

none

Required?

true

Position?

3

Default Value

none

Accept Pipeline Input?

True (ByValue)

Accept Wildcard Characters?

false

-Confirm

Prompts you for confirmation before running the cmdlet.

Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see    about_CommonParameters.

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

  • None

Outputs

The output type is the type of the objects that the cmdlet emits.

  • Microsoft.Internal.CloudBackup.Client.Cmdlets.OBPolicy

Examples

EXAMPLE 1

This example sets a protection policy.

PS C:\> $policy = Get-OBPolicy
Get-OBSchedule $policy | Set-OBSchedule $policy

EXAMPLE 2

This example sets a new protection policy.

PS C:\> $sch = New-OBSchedule -DaysOfWeek Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday -TimesOfDay 12:00,16:00,20:00
New-OBPolicy | Set-OBSchedule -Schedule $sch

Get-OBPolicy

Get-OBSchedule

New-OBPolicy

New-OBSchedule