< Back
Remove-AzureStorSimpleDeviceBackup
Post
NAME Remove-AzureStorSimpleDeviceBackup
SYNOPSIS
Deletes a backup object.
SYNTAX
Remove-AzureStorSimpleDeviceBackup [-DeviceName] <String> [-Backup] <Backup> [[-Force]] [[-WaitForComplete]] [-Profile
<Microsoft.Azure.Common.Authentication.Models.AzureProfile>] [<CommonParameters>]
Remove-AzureStorSimpleDeviceBackup [-DeviceName] <String> [-BackupId] <String> [[-Force]] [[-WaitForComplete]] [-Profile
<Microsoft.Azure.Common.Authentication.Models.AzureProfile>] [<CommonParameters>]
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.
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.
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.
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.
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.
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.
Required? false
Position? 4
Default value none
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
Backup
OUTPUTS
TaskStatusInfo, TaskResponse
This cmdlet returns a TaskStatusInfo object if you specify the WaitForComplete parameter If you do not specify that parameter, it returns a
TaskResponse object.
NOTES
Keywords: azure, azuresm, servicemanagement, management, service, store, storsimple
Example 1: Remove a backup for a device
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
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.
Example 2: Remove the first backup for a device by using its ID
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
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.
Example 3: Remove the first backup for a device by using the pipeline
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
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.
RELATED LINKS
Get-AzureStorSimpleDeviceBackup
SYNOPSIS
Deletes a backup object.
SYNTAX
Remove-AzureStorSimpleDeviceBackup [-DeviceName] <String> [-Backup] <Backup> [[-Force]] [[-WaitForComplete]] [-Profile
<Microsoft.Azure.Common.Authentication.Models.AzureProfile>] [<CommonParameters>]
Remove-AzureStorSimpleDeviceBackup [-DeviceName] <String> [-BackupId] <String> [[-Force]] [[-WaitForComplete]] [-Profile
<Microsoft.Azure.Common.Authentication.Models.AzureProfile>] [<CommonParameters>]
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.
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.
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.
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.
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.
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.
Required? false
Position? 4
Default value none
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
Backup
OUTPUTS
TaskStatusInfo, TaskResponse
This cmdlet returns a TaskStatusInfo object if you specify the WaitForComplete parameter If you do not specify that parameter, it returns a
TaskResponse object.
NOTES
Keywords: azure, azuresm, servicemanagement, management, service, store, storsimple
Example 1: Remove a backup for a device
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
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.
Example 2: Remove the first backup for a device by using its ID
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
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.
Example 3: Remove the first backup for a device by using the pipeline
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
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.
RELATED LINKS
Get-AzureStorSimpleDeviceBackup