Dela via


Disable-AzRecoveryServicesBackupRPMountScript

Demonterar alla filer i återställningspunkten.

Syntax

Disable-AzRecoveryServicesBackupRPMountScript
       [-RecoveryPoint] <RecoveryPointBase>
       [-PassThru]
       [-VaultId <String>]
       [-DefaultProfile <IAzureContextContainer>]
       [-WhatIf]
       [-Confirm]
       [<CommonParameters>]

Description

Cmdleten Disable-AzRecoveryServicesBackupRPMountScript demonterar filerna för återställningspunkten som monterades tidigare med hjälp av cmdleten Get-AzRecoveryServicesBackupRPMountScript.

Exempel

Exempel 1: Demontera en återställningspunkt

$namedContainer = Get-AzRecoveryServicesBackupContainer  -ContainerType "AzureVM" -Status "Registered" -FriendlyName "V2VM"
$backupitem = Get-AzRecoveryServicesBackupItem -Container $namedContainer  -WorkloadType "AzureVM"
$startDate = (Get-Date).AddDays(-7)
$endDate = Get-Date
$rp = Get-AzRecoveryServicesBackupRecoveryPoint -Item $backupitem -StartDate $startdate.ToUniversalTime() -EndDate $enddate.ToUniversalTime()

<# To mount files of the latest recovery point, obtain the script by #>

Get-AzRecoveryServicesBackupRPMountScript -RecoveryPoint $rp[0]

OsType  Password        Filename
------  --------        --------
Windows e3632984e51f496 V2VM_wus2_8287309959960546283_451516692429_cbd6061f7fc543c489f1974d33659fed07a6e0c2e08740.exe

<#  When the script is run, it will mount the files of the recovery point $rp[0]

After the relevant files are copied, then you remove the files of the recovery point by running the disable cmdlet #>

Disable-AzRecoveryServicesBackupRPMountScript -RecoveryPoint $rp[0]

Exempel 2

Demonterar alla filer i återställningspunkten. (automatiskt genererad)

Disable-AzRecoveryServicesBackupRPMountScript -Confirm -RecoveryPoint $rp[0] -VaultId $vault.ID

Parametrar

-Confirm

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

Typ:SwitchParameter
Alias:cf
Position:Named
Standardvärde:False
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

-PassThru

Returnera återställningspunkten.

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

-RecoveryPoint

Återställningspunktobjekt som ska återställas

Typ:RecoveryPointBase
Position:0
Standardvärde:None
Obligatorisk:True
Godkänn pipeline-indata:True
Godkänn jokertecken:False

-VaultId

ARM-ID för Recovery Services-valvet.

Typ:String
Position:Named
Standardvärde:None
Obligatorisk:False
Godkänn pipeline-indata:True
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:False
Obligatorisk:False
Godkänn pipeline-indata:False
Godkänn jokertecken:False

Indata

RecoveryPointBase

String

Utdata

RecoveryPointBase