Set-WssBackupPolicy

Creates or changes a scheduled backup policy.

Syntax

Set-WssBackupPolicy
   [-BackupPolicy] <ScheduledBackupPolicy>
   [-Force]
   [-Confirm]
   [-WhatIf]

Description

The Set-WssBackupPolicy command creates or changes a scheduled backup policy.

Examples

Example 1: Specify a scheduled backup policy

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

This example sets a scheduled backup policy as the current scheduled backup policy.

The first command gets the current 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.

The third command sets the scheduled backup policy stored in $ContosoBUPolicy25 (including the new schedule) as the current scheduled backup policy.

Parameters

-BackupPolicy

Specifies the scheduled backup policy to create or change.

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

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Position:Named
Default value:False
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Force

Forces the command to run without asking for user confirmation.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-WhatIf

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

Type:SwitchParameter
Position:Named
Default value:False
Required:False
Accept pipeline input:False
Accept wildcard characters:False