Remove-AzRecoveryServicesAsrReplicationProtectedItemDisk
Removes disks to replication protected item.
Note
This is the previous version of our documentation. Please consult the most recent version for up-to-date information.
Syntax
Remove-AzRecoveryServicesAsrReplicationProtectedItemDisk
-InputObject <ASRReplicationProtectedItem>
-VhdUri <String[]>
[-WaitForCompletion]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Remove-AzRecoveryServicesAsrReplicationProtectedItemDisk
-InputObject <ASRReplicationProtectedItem>
-DiskId <String[]>
[-WaitForCompletion]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
The Remove-AzRecoveryServicesAsrReplicationProtectedItemDisk cmdlet removes the disk from the ASR replication protected item.
Examples
Example 1
Remove-AzRecoveryServicesAsrReplicationProtectedItemDisk -ReplicationProtectedItem $rpi -VhdUri $vhdUri
Start the operation to remove specified disk from protection VM for unManaged disk.
Example 2
Remove-AzRecoveryServicesAsrReplicationProtectedItemDisk -ReplicationProtectedItem $rpi -DiskId $diskId
Start the operation to remove specified disk from protection VM for Managed disk.
Example 3
$currentJob = Remove-AzRecoveryServicesAsrReplicationProtectedItemDisk -ReplicationProtectedItem $rpi -DiskId $diskId
Get-AzRecoveryServicesAsrJob -name $currentJob.id
Starts the operation to remove the specified disk and returns the ASR job used to track the remove protected disk operation.
Parameters
Prompts you for confirmation before running the cmdlet.
| Type: | SwitchParameter |
| Aliases: | cf |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
The credentials, account, tenant, and subscription used for communication with Azure.
| Type: | IAzureContextContainer |
| Aliases: | AzContext, AzureRmContext, AzureCredential |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Specifies the list of managed disk Ids.
| Type: | String[] |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
The input object to the cmdlet: The ASR replication protected item object corresponding to which disk is to be removed.
| Type: | ASRReplicationProtectedItem |
| Aliases: | ReplicationProtectedItem |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |
Specifies the list of vhd Uri's.
| Type: | String[] |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Wait For Completion
| Type: | SwitchParameter |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Shows what would happen if the cmdlet runs. The cmdlet is not run.
| Type: | SwitchParameter |
| Aliases: | wi |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |