Add-WssBackupSchedule

Adds a date and time to a backup policy for use as a backup schedule.

Syntax

Add-WssBackupSchedule
   [-BackupPolicy] <ScheduledBackupPolicy>
   [-BackupTime] <DateTime>
   [<CommonParameters>]

Description

The Add-WssBackupSchedule cmdlet adds a date and time to a backup policy. The backup process uses this date and time as a backup schedule.

Examples

Example 1: Add a backup schedule to a backup policy

PS C:\>$ContosoBUPolicy25 = Get-WssBackupPolicy
PS C:\> Add-WssBackupSchedule -BackupPolicy $ContosoBUPolicy25 -BackupTime 5:00

This example adds a backup schedule to a backup policy.

The first command gets the backup policy for the computer and stores it in the $ContosoBUPolicy25 variable.

The second command adds 5:00 A.M. daily as a backup schedule for the backup policy stored in $ContosoBUPolicy25.

Parameters

-BackupPolicy

Specifies the backup policy to which to add the backup schedule.

Type:ScheduledBackupPolicy
Position:0
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-BackupTime

Specifies the backup date and time to add to the scheduled backup policy.

Type:DateTime
Position:1
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

Outputs

Microsoft.WindowsServerSolutions.DataProtection.ServerBackup.ObjectModel.ScheduledBackupPolicy

This cmdlet returns the BackupPolicy parameter.