Cmdlets

Choose a cmdlet from the list on the left or search for a specific cmdlet. Choose a cmdlet from the list or search for a specific cmdlet.
About Help  Providers
 

Set-AzureStorSimpleDeviceBackupPolicy

Set-AzureStorSimpleDeviceBackupPolicy

microsoft.windowsazure.commands.storsimple.dll

Synopsis

Updates an existing backup policy.

Syntax

Set-AzureStorSimpleDeviceBackupPolicy [-DeviceName] [-BackupPolicyId] [-BackupPolicyName] [-BackupSchedulesToAdd] [-BackupSchedulesToUpdate] [-BackupScheduleIdsToDelete] [-VolumeIdsToUpdate] [-WaitForComplete] [-NewName] [-Profile] [<CommonParameters>]

Detailed Description

The Set-AzureStorSimpleDeviceBackupPolicy cmdlet updates an existing backup policy. You can rename the policy, add, update or delete schedules, and update the volumes associated with the policy.

Parameters

-BackupPolicyId <String>

Specifies the instance ID of the BackupPolicy object to update.

Aliases

none

Required?

true

Position

2

Default value

none

Accept pipeline input?

false

Accept wildcard characters?

false

-BackupPolicyName <String>

Specifies a new name for the backup policy.

Aliases

none

Required?

true

Position

3

Default value

none

Accept pipeline input?

false

Accept wildcard characters?

false

-BackupScheduleIdsToDelete <PSObject[]>

Specifies an array of instance IDs of BackupSchedule objects to delete.

Aliases

none

Required?

false

Position

6

Default value

none

Accept pipeline input?

false

Accept wildcard characters?

false

-BackupSchedulesToAdd <PSObject[]>

Specifies an array of BackupScheduleBase objects to add to the policy. To obtain a BackupScheduleBase object, use the New-AzureStorSimpleDeviceBackupScheduleAddConfig cmdlet.

Aliases

none

Required?

false

Position

4

Default value

none

Accept pipeline input?

false

Accept wildcard characters?

false

-BackupSchedulesToUpdate <PSObject[]>

Specifies an array of BackupScheduleUpdateRequest objects to update. To obtain a BackupScheduleUpdateRequest object, use the New-AzureStorSimpleDeviceBackupScheduleUpdateConfig cmdlet.

Aliases

none

Required?

false

Position

5

Default value

none

Accept pipeline input?

false

Accept wildcard characters?

false

-DeviceName <String>

Specifies the name of the StorSimple device for which to update the backup policy.

Aliases

none

Required?

true

Position

1

Default value

none

Accept pipeline input?

false

Accept wildcard characters?

false

-NewName <System.String>

Specifies a name for the device.

Aliases

none

Required?

false

Position

9

Default value

none

Accept pipeline input?

false

Accept wildcard characters?

false

-Profile <Microsoft.Azure.Common.Authentication.Models.AzureProfile>

Specifies an Azure profile.

Aliases

none

Required?

false

Position

named

Default value

none

Accept pipeline input?

false

Accept wildcard characters?

false

-VolumeIdsToUpdate <PSObject[]>

Specifies an array of IDs of volumes for which to update backup policies.

Aliases

none

Required?

false

Position

7

Default value

none

Accept pipeline input?

false

Accept wildcard characters?

false

-WaitForComplete <SwitchParameter>

Indicates that this cmdlet waits for the operation to complete before it returns control to the Windows PowerShell® console.

Aliases

none

Required?

false

Position

8

Default value

none

Accept pipeline input?

false

Accept wildcard characters?

false

Input Type

None

Return Type

TaskStatusInfo, TaskResponse

Notes

None

Examples

Example 1: Change the name of a backup policy

This command changes the name of the backup policy that has the specified ID to UpdatedGeneralPolicy07. This command specifies the WaitForComplete parameter, so the command completes the task, and then returns a TaskStatusInfo object for the task.

PS C:\>Set-AzureStorSimpleDeviceBackupPolicy -DeviceName "Contoso63-AppVm" -BackupPolicyId "e6d9f1b3-a250-4d57-966a-039c8eaef9e9" -BackupPolicyName "UpdatedGeneralPolicy07" -WaitForComplete
VERBOSE: ClientRequestId: f4465b46-26cc-40ff-88da-7a28df88c35c_PS
VERBOSE: ClientRequestId: 5e33a35c-e089-47c1-b760-474635b1ead8_PS
VERBOSE: About to run a task to update your backuppolicy! 
VERBOSE: ClientRequestId: e379ebdb-667f-45a9-aafa-a6cd61e5f6f6_PS


JobId        : 9d621bfd-3faa-4d1c-b28b-45c5f4a96975
JobResult    : Succeeded
JobStatus    : Completed
ErrorCode    : 
ErrorMessage : 
JobSteps     : {Microsoft.WindowsAzure.Management.StorSimple.Models.TaskStep}

VERBOSE: The job created for your update operation has completed successfully. 
VERBOSE: ClientRequestId: 4fe965ea-4e12-4869-9d67-e42a24b6c5d8_PS
BackupSchedules          : {58e9cd7c-4c6a-4e33-9109-5ec0b8fcb2cc, b10e1bf4-ef0a-4ad3-8fde-eecfc9971dd2}
Volumes                  : {testvolume03}
BackupPolicyCreationType : BySaaS
LastBackup               : 12/16/2014 2:13:28 PM
NextBackup               : 12/16/2014 3:13:43 PM
SchedulesCount           : 2
SSMHostName              : 
VolumesCount             : 1
InstanceId               : e6d9f1b3-a250-4d57-966a-039c8eaef9e9
Name                     : UpdatedGeneralPolicy07
OperationInProgress      : None 

Example 2: Update the schedule for a backup policy

The first command creates an update configuration object by using the New-AzureStorSimpleDeviceBackupScheduleUpdateConfig cmdlet, and then stores it in the $UpdateConfig variable.

The second command creates a new array variable, named $UpdateArray. The next command adds the update stored in $UpdateConfig to that array. You can add more than one update to the array.

The final command updates the backup policy that has the specified ID on the device named Contoso63-AppVm. The policy now has the updated schedule stored in $UpdateArray.

PS C:\>$UpdateConfig = New-AzureStorSimpleDeviceBackupScheduleUpdateConfig -Id "3a6c6247-6b4d-42e2-aa87-16f4f21476ea" -BackupType CloudSnapshot -RecurrenceType Daily -RecurrenceValue 3 -RetentionCount 2 -Enabled $True
PS C:\> $UpdateArray = @()
PS C:\> $UpdateArray += $UpdateConfig
PS C:\> Set-AzureStorSimpleDeviceBackupPolicy -DeviceName "Contoso63-AppVm" -BackupPolicyId "712605f6-eb03-4db8-8f79-e0ce64b2cce1" -BackupSchedulesToUpdate $UpdateArray
Error      : Microsoft.WindowsAzure.Management.StorSimple.Models.ErrorDetails
JobId      : 7b265417-a5f1-45ad-8fbc-33bad4f63ec9
JobSteps   : {Microsoft.WindowsAzure.Management.StorSimple.Models.JobStep, 
             Microsoft.WindowsAzure.Management.StorSimple.Models.JobStep, 
             Microsoft.WindowsAzure.Management.StorSimple.Models.JobStep, 
             Microsoft.WindowsAzure.Management.StorSimple.Models.JobStep...} 
Result     : Succeeded
Status     : Completed
TaskResult : Succeeded
StatusCode : OK
RequestId  : d2e10d44e699b371a84db44d19daf1c3

Get-AzureStorSimpleDeviceBackupPolicy
New-AzureStorSimpleDeviceBackupPolicy
Remove-AzureStorSimpleDeviceBackupPolicy
New-AzureStorSimpleDeviceBackupScheduleUpdateConfig