Set-WBSchedule

Set-WBSchedule

Sets the times to create daily backups for the backup policy (WBPolicy object).

Syntax

Set-WBSchedule [-Policy] <WBPolicy> [-Schedule] <DateTime[]> [<CommonParameters>]

Detailed Description

The Set-WBSchedule cmdlet sets the times to create daily backups for the backup policy (WBPolicy object).

Parameters

-Policy <WBPolicy>

Specifies the backup policy (WBPolicy object) to update.

Attributes

Name Value

Required?

true

Accept wildcard characters?

false

Accept Pipeline Input?

true (ByPropertyName)

Position?

1

-Schedule <DateTime[]>

Specifies the times of day to create a backup (comma-delimited and formatted as HH:MM) for the backup policy.

Attributes

Name Value

Required?

true

Accept wildcard characters?

false

Accept Pipeline Input?

true (ByPropertyName)

Position?

2

-CommonParameter

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

Input and Return Types

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

Notes

  • The WBPolicy object must be in edit mode. To put the WBPolicy object in edit mode for a policy that has been set as the scheduled backup policy, use the Get-WBPolicy cmdlet with the -Editable parameter. The New-WBPolicy cmdlet creates a new WBPolicy object already in edit mode.

  • To use Windows Server Backup cmdlets, you must be a member of the Administrators group or Backup Operators group.

Examples

EXAMPLE 1

C:\PS>Set-WBSchedule -Policy $policy -Schedule 12:00,09:00

A list of Datetime objects with which the policy object has been updated.

Description

-----------

Sets the times to create backups in the schedule in the WBPolicy object $policy. When this policy is set on the computer, the backups will be created daily at the times specified.

See Also

Reference

Get-WBSchedule
Get-WBPolicy