Set-​Azure​Rm​Backup​Protection​Policy

Modifies an existing protection policy.

Syntax

Set-AzureRmBackupProtectionPolicy
   [-ProtectionPolicy] <AzureRMBackupProtectionPolicy>
   [[-NewName] <String>]
   [-Daily]
   [[-BackupTime] <DateTime>]
   [[-RetentionPolicy] <AzureRMBackupRetentionPolicy[]>]
   [<CommonParameters>]
Set-AzureRmBackupProtectionPolicy
   [-ProtectionPolicy] <AzureRMBackupProtectionPolicy>
   [[-NewName] <String>]
   [-Weekly]
   [[-BackupTime] <DateTime>]
   [[-RetentionPolicy] <AzureRMBackupRetentionPolicy[]>]
   [[-DaysOfWeek] <String[]>]
   [<CommonParameters>]

Description

The Set-AzureRmBackupProtectionPolicy cmdlet modifies an existing protection policy in Azure Backup. You can modify the following protection policy components:

  • Name
  • Backup schedule
  • Retention policies

Any change might affect the backup and retention of the items associated with the policy.

Examples

1:

Required Parameters

-ProtectionPolicy

Specifies protection policy that this cmdlet modifies. To obtain an AzureRmBackupProtectionPolicy object, use the Get-AzureRmBackupProtectionPolicy cmdlet.

Type:AzureRMBackupProtectionPolicy
Position:0
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False

Optional Parameters

-BackupTime

Specifies the new backup time of day, as a DateTime object, for the policy. To obtain a DateTime object, use the Get-Date cmdlet. For information about DateTime objects, type Get-Help Get-Date.

Type:DateTime
Position:4
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Daily

Indicates that the backup operation runs on a Daily schedule.

Type:SwitchParameter
Position:2
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-DaysOfWeek

Specifies an array of days of the week. This policy runs backups on the days specified by this parameter. The acceptable values for this parameter are:

  • Monday
  • Tuesday
  • Wednesday
  • Thursday
  • Friday
  • Saturday
  • Sunday
Type:String[]
Parameter Sets:Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday
Position:6
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-NewName

Specifies the new name for the policy. This name must be unique in a vault.

Type:String
Position:1
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-RetentionPolicy

Specifies an array of retention policies for the backup policy. To obtain AzureRmBackupRetentionPolicy objects, use the New-AzureRmBackupRetentionPolicyObject cmdlet.

Type:AzureRMBackupRetentionPolicy[]
Position:5
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Weekly

Indicates that the backup operation runs on a Weekly schedule.

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

Inputs

AzureRmBackupProtectionPolicy

Outputs

None