New-AzDataProtectionPolicyTriggerScheduleClientObject

Creates new Schedule object

Syntax

New-AzDataProtectionPolicyTriggerScheduleClientObject
   -ScheduleDays <DateTime[]>
   -IntervalType <BackupFrequency>
   -IntervalCount <Int32>
   [<CommonParameters>]

Description

Creates new Schedule object

Examples

Example 1: Create a daily schedule object

$date = Get-Date
New-AzDataProtectionPolicyTriggerScheduleClientObject -ScheduleDays $date -IntervalType Daily -IntervalCount 1

R/2021-03-03T12:49:55+05:30/P1D

This command creates a daily schedule for Azure Backup Rule

Example 2: Create an hourly schedule object

$date = Get-Date
New-AzDataProtectionPolicyTriggerScheduleClientObject -ScheduleDays $date -IntervalType Hourly -IntervalCount 4

R/2021-03-03T12:49:55+05:30/PT4H

This command creates an hourly scheudle for Azure Backup Rule.

Parameters

-IntervalCount

Frequency of the backup.

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

-IntervalType

Freuquency of the backup.

Type:BackupFrequency
Accepted values:Daily, Weekly, Hourly
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-ScheduleDays

Days with which backup will be scheduled.

Type:DateTime[]
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

Outputs

String[]