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
 

Remove-AzureStorSimpleDeviceBackup

Remove-AzureStorSimpleDeviceBackup

microsoft.windowsazure.commands.storsimple.dll

Synopsis

Deletes a backup object.

Syntax

Remove-AzureStorSimpleDeviceBackup [-DeviceName] [-Backup] [-Force] [-WaitForComplete] [-Profile] [<CommonParameters>]

Remove-AzureStorSimpleDeviceBackup [-DeviceName] [-BackupId] [-Force] [-WaitForComplete] [-Profile] [<CommonParameters>]

Detailed Description

The Remove-AzureStorSimpleDeviceBackup cmdlet deletes a single backup object. If you attempt to delete a backup that has already been deleted, this cmdlet returns an error.

Parameters

-Backup <Backup>

Specifies the Backup object to delete. To obtain a Backup object, use the Get-AzureStorSimpleDeviceBackup cmdlet.

Aliases

none

Required?

true

Position

2

Default value

none

Accept pipeline input?

true(ByValue)

Accept wildcard characters?

false

-BackupId <String>

Specifies the instance ID of a backup to delete.

Aliases

none

Required?

true

Position

2

Default value

none

Accept pipeline input?

false

Accept wildcard characters?

false

-DeviceName <String>

Specifies the name of the StorSimple device on which to delete a backup.

Aliases

none

Required?

true

Position

1

Default value

none

Accept pipeline input?

false

Accept wildcard characters?

false

-Force <SwitchParameter>

Indicates that this cmdlet does not prompt you for confirmation.

Aliases

none

Required?

false

Position

3

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

-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

4

Default value

none

Accept pipeline input?

false

Accept wildcard characters?

false

Input Type

Backup

Return Type

TaskStatusInfo, TaskResponse

Notes

None

Examples

Example 1: Remove a backup for a device

This command removes the backup that has the specified ID for the device named Contoso63-AppVm. The command starts the operation that removes the Backup object, and then returns a TaskResponse object. To see the status of the task, use the Get-AzureStorSimpleTask cmdlet.

PS C:\>Remove-AzureStorSimpleDeviceBackup -DeviceName "Contoso63-AppVm" -BackupId "dcb5c991-0485-400f-8d0a-03a1341ee989" -Force
The remove job is submitted successfully. Please use the command Get-AzureStorSimpleTask -InstanceId 6c73aff2-f5a1-4b5e-
9a4e-857e128dc216 for tracking the job status 

Example 2: Remove the first backup for a device by using its ID

The first command gets the backups for the device named Contoso63-AppVm, and then stores them in the $Backup variable.

The second command deletes a backup from the device named Contoso63-AppVm. The command uses standard dot notation to refer to the InstanceId property of the first element of the $Backup array. This command specifies the WaitForComplete parameter, and, therefore, the command waits until the operation is complete, and then returns a TaskStatusInfo object.

PS C:\>$Backup = Get-AzureStorSimpleDeviceBackup -DeviceName "Contoso63-AppVm"
PS C:\> Remove-AzureStorSimpleDeviceBackup -DeviceName "Contoso63-AppVm" -BackupId $Backup[0].InstanceId -WaitForComplete
Error      : Microsoft.WindowsAzure.Management.StorSimple.Models.ErrorDetails
JobId      : 53a656c3-c082-4e1f-afb7-bff3db45c791
JobSteps   : {}
Result     : Succeeded
Status     : Completed
TaskResult : Succeeded
StatusCode : OK
RequestId  : f4411f38d07f68b88095682dbeedd9e9 

Example 3: Remove the first backup for a device by using the pipeline

The first command gets the backups for the device named Contoso63-AppVm, and then stores them in the $Backup variable.

The second command passes the first object stored in the $Backup array to the current cmdlet. That cmdlet deletes that backup from the device named Contoso63-AppVm. This command specifies the WaitForComplete parameter, and, therefore, the command waits until the operation is complete, and then returns a TaskStatusInfo object.

PS C:\>$Backup = Get-AzureStorSimpleDeviceBackup -DeviceName "Contoso-AppVm" -WaitForComplete
PS C:\> $Backup[0] | Remove-AzureStorSimpleDeviceBackup -DeviceName "Contoso-AppVm" -Force -WaitForComplete
Error      : Microsoft.WindowsAzure.Management.StorSimple.Models.ErrorDetails
JobId      : 48059fd8-e355-4b91-9385-630d24f31df6
JobSteps   : {}
Result     : Succeeded
Status     : Completed
TaskResult : Succeeded
StatusCode : OK
RequestId  : e1753f3bf68e6e44ab719436b5111e41 

Get-AzureStorSimpleDeviceBackup