Szerkesztés

Megosztás a következőn keresztül:


Remove-AzRecoveryServicesAsrReplicationProtectedItemDisk

Removes disks to replication protected item.

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

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with Azure.

Type:IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DiskId

Specifies the list of managed disk Ids.

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

-InputObject

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
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-VhdUri

Specifies the list of vhd Uri's.

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

-WaitForCompletion

Wait For Completion

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

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

ASRReplicationProtectedItem

Outputs

ASRJob