Edit

Share via


Edit-AzDataProtectionPolicyTriggerClientObject

Updates Backup schedule of an existing backup policy.

Syntax

RemoveBackupSchedule (Default)

Edit-AzDataProtectionPolicyTriggerClientObject
    -Policy <IBackupPolicy>
    [-RemoveSchedule]
    [<CommonParameters>]

ModifyBackupSchedule

Edit-AzDataProtectionPolicyTriggerClientObject
    -Policy <IBackupPolicy>
    -Schedule <String[]>
    [<CommonParameters>]

Description

Updates Backup schedule of an existing backup policy.

Examples

Example 1: Add Daily schedule to Azure Backup rule.

$schedule = New-AzDataProtectionPolicyTriggerScheduleClientObject -ScheduleDays (Get-Date) -IntervalType Daily -IntervalCount 1
Edit-AzDataProtectionPolicyTriggerClientObject -Policy $pol -Schedule $schedule
DatasourceType            ObjectType
--------------            ----------
{Microsoft.Compute/disks} BackupPolicy

This command updates backup schedule of given policy to daily backup.

Parameters

-Policy

Backup Policy object. To construct, see NOTES section for POLICY properties and create a hash table.

Parameter properties

Type:IBackupPolicy
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-RemoveSchedule

Specifies whether to remove the backup Schedule.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

RemoveBackupSchedule
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Schedule

Schedule to be associated to backup policy.

Parameter properties

Type:

String[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ModifyBackupSchedule
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

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

Outputs

IBackupPolicy