Dela via


Remove-AzRecoveryServicesAsrReplicationProtectedItemDisk

Tar bort diskar till replikeringsskyddat objekt.

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

Cmdleten remove-AzRecoveryServicesAsrReplicationProtectedItemDisk tar bort disken från det asr-replikeringsskyddade objektet.

Exempel

Exempel 1

Remove-AzRecoveryServicesAsrReplicationProtectedItemDisk -ReplicationProtectedItem $rpi -VhdUri $vhdUri

Starta åtgärden för att ta bort den angivna disken från den virtuella skyddsdatorn för ohanterad disk.

Exempel 2

Remove-AzRecoveryServicesAsrReplicationProtectedItemDisk -ReplicationProtectedItem $rpi -DiskId $diskId

Starta åtgärden för att ta bort den angivna disken från den virtuella skyddsdatorn för hanterad disk.

Exempel 3

$currentJob = Remove-AzRecoveryServicesAsrReplicationProtectedItemDisk -ReplicationProtectedItem $rpi -DiskId $diskId
Get-AzRecoveryServicesAsrJob -name $currentJob.id

Startar åtgärden för att ta bort den angivna disken och returnerar det ASR-jobb som används för att spåra åtgärden ta bort skyddad disk.

Parametrar

-Confirm

Uppmanar dig att bekräfta innan du kör cmdleten.

Typ:SwitchParameter
Alias:cf
Position:Named
Standardvärde:None
Obligatorisk:False
Godkänn pipeline-indata:False
Godkänn jokertecken:False

-DefaultProfile

Autentiseringsuppgifter, konto, klientorganisation och prenumeration som används för kommunikation med Azure.

Typ:IAzureContextContainer
Alias:AzContext, AzureRmContext, AzureCredential
Position:Named
Standardvärde:None
Obligatorisk:False
Godkänn pipeline-indata:False
Godkänn jokertecken:False

-DiskId

Anger listan över hanterade disk-ID:t.

Typ:String[]
Position:Named
Standardvärde:None
Obligatorisk:True
Godkänn pipeline-indata:False
Godkänn jokertecken:False

-InputObject

Indataobjektet till cmdleten: DET ASR-replikeringsskyddade objektobjekt som motsvarar vilken disk som ska tas bort.

Typ:ASRReplicationProtectedItem
Alias:ReplicationProtectedItem
Position:Named
Standardvärde:None
Obligatorisk:True
Godkänn pipeline-indata:True
Godkänn jokertecken:False

-VhdUri

Anger listan över vhd-URI:er.

Typ:String[]
Position:Named
Standardvärde:None
Obligatorisk:True
Godkänn pipeline-indata:False
Godkänn jokertecken:False

-WaitForCompletion

Vänta tills det är klart

Typ:SwitchParameter
Position:Named
Standardvärde:None
Obligatorisk:False
Godkänn pipeline-indata:False
Godkänn jokertecken:False

-WhatIf

Visar vad som skulle hända om cmdleten körs. Cmdleten körs inte.

Typ:SwitchParameter
Alias:wi
Position:Named
Standardvärde:None
Obligatorisk:False
Godkänn pipeline-indata:False
Godkänn jokertecken:False

Indata

Utdata