Set-AzureRmBackupProtectionPolicy

Modifies an existing protection policy.

Warning

The AzureRM PowerShell module has been officially deprecated as of February 29, 2024. Users are advised to migrate from AzureRM to the Az PowerShell module to ensure continued support and updates.

Although the AzureRM module may still function, it's no longer maintained or supported, placing any continued use at the user's discretion and risk. Please refer to our migration resources for guidance on transitioning to the Az module.

Syntax

Set-AzureRmBackupProtectionPolicy
   [[-NewName] <String>]
   [[-BackupTime] <DateTime>]
   [[-RetentionPolicy] <AzureRMBackupRetentionPolicy[]>]
   [-ProtectionPolicy] <AzureRMBackupProtectionPolicy>
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]
Set-AzureRmBackupProtectionPolicy
   [[-NewName] <String>]
   [-Daily]
   [[-BackupTime] <DateTime>]
   [[-RetentionPolicy] <AzureRMBackupRetentionPolicy[]>]
   [-ProtectionPolicy] <AzureRMBackupProtectionPolicy>
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]
Set-AzureRmBackupProtectionPolicy
   [[-NewName] <String>]
   [-Weekly]
   [[-BackupTime] <DateTime>]
   [[-RetentionPolicy] <AzureRMBackupRetentionPolicy[]>]
   [[-DaysOfWeek] <String[]>]
   [-ProtectionPolicy] <AzureRMBackupProtectionPolicy>
   [-DefaultProfile <IAzureContextContainer>]
   [<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.

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
Required:False
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
Required:False
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[]
Accepted values:Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday
Position:6
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with azure

Type:IAzureContextContainer
Aliases:AzureRmContext, AzureCredential
Position:Named
Default value:None
Required:False
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
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-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
Required:True
Accept pipeline input:True
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
Required:False
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
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

AzureRMBackupProtectionPolicy

Parameters: ProtectionPolicy (ByValue)

Outputs

AzureRMBackupJob